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

Support LATERAL VIEW json_tuple AS ... in Hive VIEW #7420

Merged
merged 2 commits into from Mar 30, 2021

Conversation

findepi
Copy link
Member

@findepi findepi commented Mar 25, 2021

Fixes #7242

@findepi findepi requested a review from losipiuk March 25, 2021 16:30
@cla-bot cla-bot bot added the cla-signed label Mar 25, 2021
pom.xml Outdated Show resolved Hide resolved
@findepi findepi mentioned this pull request Mar 25, 2021
@findepi findepi force-pushed the json_tuple branch 2 times, most recently from 98a5b23 to 85445a4 Compare March 26, 2021 10:26
onTrino().executeQuery("DROP TABLE IF EXISTS test_json_tuple_table");
onTrino().executeQuery("" +
"CREATE TABLE test_json_tuple_table AS " +
"SELECT 3 id, CAST('{\"user_id\": 1000, \"first.name\": \"Mateusz\", \"Last Name\": \"Gajewski\", \".NET\": true}' AS varchar) jsonstr");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wendigo please review this query ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok but can we @findepi add an non-existent field as well (which should yield NULL)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding. And adding a field with json null value as well.

"SELECT 3 id, CAST('{\"user_id\": 1000, \"first.name\": \"Mateusz\", \"Last Name\": \"Gajewski\", \".NET\": true}' AS varchar) jsonstr");

onHive().executeQuery("DROP VIEW IF EXISTS test_json_tuple_view");
onHive().executeQuery("CREATE VIEW test_json_tuple_view AS " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Do you support the cN syntax alrady (without explicit column names)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> #7456

Wording copied from session property.
@findepi findepi marked this pull request as ready for review March 30, 2021 09:48
@findepi findepi changed the title Support LATERAL VIEW json_tuple in Hive VIEW Support LATERAL VIEW json_tuple AS ... in Hive VIEW Mar 30, 2021
@findepi
Copy link
Member Author

findepi commented Mar 30, 2021

AC; updated to a release of Coral and fixed title, commit message to indicate the ... AS ... syntax is the one being supported here.

@findepi findepi merged commit 4ff5421 into trinodb:master Mar 30, 2021
@findepi findepi deleted the json_tuple branch March 30, 2021 12:00
@findepi findepi added this to the 355 milestone Mar 30, 2021
@findepi findepi mentioned this pull request Mar 30, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Support HIVE VIEW with LATERAL VIEW json_tuple AS ...
3 participants