Skip to content

Use varchar for MySQL/PostgreSQL native JSON fields.#7506

Closed
stewartpark wants to merge 1 commit intoprestodb:masterfrom
stewartpark:native-json-fields
Closed

Use varchar for MySQL/PostgreSQL native JSON fields.#7506
stewartpark wants to merge 1 commit intoprestodb:masterfrom
stewartpark:native-json-fields

Conversation

@stewartpark
Copy link
Contributor

@stewartpark stewartpark commented Mar 4, 2017

Fixes #5649
Also mentioned in #5989 #6614

We noticed that native JSON fields are not supported for our MySQL/PostgreSQL databases.

The changes introduce a new behavior where the field types are not in the cases, it just assumes the type as varchar, which is pretty reasonable, giving back users the chance to parse/deal with the data easily in case of missing native support. But open to suggestions!

@electrum
Copy link
Contributor

For JSON, we'd rather map these to Presto's JSON type. However, I started working on that a while back and it turned out to be rather complex, so this is a reasonable first step.

What happens with inserts into an existing table with JSON or other types?

@xborderx
Copy link

xborderx commented Apr 4, 2018

Any update on this issue?
Thanks!

additionally, my use case is simply importing data from psql to Presto and I don't worry about exporting from Presto to psql. So I really just a readonly support for jsonb.

@gseva
Copy link

gseva commented Apr 5, 2018

We're interested in this also. If we could access json/jsonb columns as text, it would be already very useful.

@dowjones226
Copy link

yeah, any updates on this?

@stewartpark
Copy link
Contributor Author

Since it's been getting some interest, I feel obligated to update you guys here. This was buried with some other big task I had at the time and I failed to update the PR. So the last time I worked on this, I had a problem inserting like @electrum suggested. Didn't explore options to solve this, so I'll close this PR and repoke(or let others poke) at this when I have some allocated time for this.

@stewartpark stewartpark deleted the native-json-fields branch June 21, 2018 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants