Hello Aman Sinha, Joe McDonnell,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/21600
to look at the new patch set (#6).
Change subject: IMPALA-13440: Calcite ParserTest changes
......................................................................
IMPALA-13440: Calcite ParserTest changes
Enable the ParserTest for Calcite.
A helper class is now used for ParserTest. The implementation for Impala
will call the Impala cup parser while the Calcite implementation will
call the Calcite Parser.
At this point, there are queries in Calcite that do not compile in Impala
and vice versa. These are handled in a couple different ways.
Any query that parses in Impala and not Calcite should be placed in
PARSES_OK_FAILURES in the CalciteParserTestHelperImpl file.
Any query that parses in Calcite and not Impala should be placed in
PARSES_ERROR_FAILURES in the CalciteParserTestHelperImpl file.
Any query where there is a known syntax problem that stretches across
many queries should be put in KNOWN_GENERAL_SYNTAX_FAILURES in
the CalciteParserTestHelperImpl file. For instance, "right semi join"
queries don't work in Calcite yet.
At this point, hints do not work in Calcite. The logic to validate hints
would be different for Calcite and Impala, so all hint helper validation
methods are in the Helper class. For Calcite at this moment, no validation
is done.
All unit tests are in a shared class called ParserTest. Some unit tests
do not work at all in Calcite. These unit tests are overridden in the
CalciteParserTest. This should only be done in extreme cases where all
tests in the method fail due to the lack of a Calcite implementation. For
instance, time travel queries in Iceberg have yet to be implemented in
Calcite.
Change-Id: I32da9f84dd70a933f24f5257fb02853f6316e6c2
---
M fe/src/main/java/org/apache/impala/analysis/ArithmeticExpr.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java
A fe/src/test/java/org/apache/impala/analysis/DerivedParserTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
A fe/src/test/java/org/apache/impala/analysis/ParserTestHelper.java
A fe/src/test/java/org/apache/impala/analysis/ParserTestHelperImpl.java
M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java
M fe/src/test/java/org/apache/impala/common/FrontendTestBase.java
M java/calcite-planner/pom.xml
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteQueryParser.java
A java/calcite-planner/src/test/java/org/apache/impala/CalciteParserTest.java
A
java/calcite-planner/src/test/java/org/apache/impala/CalciteParserTestHelperImpl.java
13 files changed, 2,936 insertions(+), 2,165 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/00/21600/6
--
To view, visit http://gerrit.cloudera.org:8080/21600
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I32da9f84dd70a933f24f5257fb02853f6316e6c2
Gerrit-Change-Number: 21600
Gerrit-PatchSet: 6
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>