Steve Carlin has uploaded a new patch set (#15). ( https://gerrit.cloudera.org/24253 )
Change subject: IMPALA-14459: Calcite planner: support Impala values statements ...................................................................... IMPALA-14459: Calcite planner: support Impala values statements This commit adds support for values statements that are not already supported by Calcite. Since some of the Impala values clauses are quite different from what Calcite supports, the values section in Parser.jj needed to be rewritten. The main differences for Impala are: - Impala supports double parenthesis around values clauses, e.g. "values((3, 5), (2, 4), (1,8))" Calcite did not handle the double parens, as these were treated as a complex structure of one row. - Impala supports aliases within the first row of the values clause, e.g. "values (3 x, 4 y), (5, 6), (7, 8)" or "values (3 as x, 4 as y), (5, 6), (7, 8)" One issue came up while implementing this feature. Because of an issue in the Calcite SqlValidatorImpl, a values statement with only one item that also has an alias clause throws an exception. Special code has been added to catch the exception and throw an UnsupportedFeatureException when this occurs. When an UnsupportedFeatureException is thrown from the Calcite planner, the original planner will kick in and handle the query. IMPALA-14943 has been filed for investigation into this. Change-Id: I9d0724c392152260391f47bc5ef1dfbb5c9d4648 Assisted-by: Composer (Cursor) Co-authored-by: Cursor <[email protected]> --- M java/calcite-planner/src/main/codegen/templates/Parser.jj M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java M java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteValuesLiteralTest.java M testdata/workloads/functional-query/queries/QueryTest/calcite.test A testdata/workloads/functional-query/queries/QueryTest/values_calcite_planner_bug.test M tests/query_test/test_calcite_planner.py 6 files changed, 649 insertions(+), 18 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/24253/15 -- To view, visit https://gerrit.cloudera.org/24253 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9d0724c392152260391f47bc5ef1dfbb5c9d4648 Gerrit-Change-Number: 24253 Gerrit-PatchSet: 15 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]>
