Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22412 )
Change subject: IMPALA-13571: Calcite Planner: Fix join parsing errors. ...................................................................... Patch Set 4: (5 comments) http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/codegen/templates/Parser.jj File java/calcite-planner/src/main/codegen/templates/Parser.jj: http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/codegen/templates/Parser.jj@1307 PS4, Line 1307: ( <STRAIGHT_JOIN> )? > There are 3 variations: Added the CLUSTERED hint As for the 2nd and 3rd variation, those are treated as comments. The /* */ one is already handled. The square brackets one is handled by this gerrit request: https://gerrit.cloudera.org/#/c/21987/ http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteJniFrontend.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteJniFrontend.java: http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteJniFrontend.java@224 PS4, Line 224: if (LEFT_ANTI.matcher(s).matches()) { > nit: you could combine the checks for left, right anti joins since the erro Done http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java: http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@127 PS4, Line 127: * Populate the CalciteSchema with tables being used by this query. > The returned list of table names is actually the error tables, not the vali Done http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@211 PS4, Line 211: // TODO: 'complex' tables ignored for now > I suppose this TODO can be removed in this patch since there's an error mes Done http://gerrit.cloudera.org:8080/#/c/22412/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@277 PS4, Line 277: StmtMetadataLoader errorLoader = new StmtMetadataLoader( > Shouldn't this StmtMetadataLoader be instantiated only once for this class The reason for a new StmtMetadataLoader is due to this line of code: https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/StmtMetadataLoader.java#L165 If a "loadTables" was attempted and there are failed tables, it doesn't allow it to be called again. I had 2 choices: Either do what I did and instantiate a new Loader or remove that Preconditions statement. I chose the reason I did because I felt that this is an error path so performance doesn't really matter, and I didn't want to affect the main path code. I don't have a strong feeling about going the other way though. -- To view, visit http://gerrit.cloudera.org:8080/22412 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd0f68441c84b090ed2cb45de96ccee1054deef5 Gerrit-Change-Number: 22412 Gerrit-PatchSet: 4 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[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]> Gerrit-Comment-Date: Tue, 04 Feb 2025 02:57:10 +0000 Gerrit-HasComments: Yes
