Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor!(hive): improve transpilation of TO_JSON #1809

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

georgesittas
Copy link
Collaborator

@georgesittas georgesittas commented Jun 19, 2023

Related discussion: #1803 (comment)

This is a best-effort approach, so it might not be complete. The difficulty of transpiling these JSON calls correctly stems from the fact that Hive / Spark work with JSON values using only their string representation (*), whereas Trino and Presto have native support for them, using a JSON type.

Note: all changed tests were previously failing in Spark. The new ones work and have the same semantics as in Trino.

(*) Or by parsing them, e.g. with FROM_JSON, and converting them into native struct types like struct and map.

References:

@georgesittas georgesittas requested a review from tobymao June 19, 2023 22:22
@tobymao tobymao merged commit 458f12d into main Jun 20, 2023
@tobymao tobymao deleted the jo/improve_to_json_hive branch June 20, 2023 02:24
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.

2 participants