Steve Carlin has posted comments on this change. ( https://gerrit.cloudera.org/25144 )
Change subject: IMPALA-14944: Calcite fallback via UnsupportedFeatureException ...................................................................... Patch Set 3: (11 comments) https://gerrit.cloudera.org/#/c/25144/3//COMMIT_MSG Commit Message: https://gerrit.cloudera.org/#/c/25144/3//COMMIT_MSG@9 PS3, Line 9: This commit adds code to throw an UnsupportedFeatureException for queries : that cannot be handled by the Calcite planner. The benefit for throwing this : specific exception rather than any other exception is that this will be : used to track queries not supported by Calcite and allow them to pass by : running them through the original planner. In this way, when all queries : are either supported or have this exception thrown, the Jenkins job will : be able to pass when there is no fallback planner specified. > This is a very minor nit: Done https://gerrit.cloudera.org/#/c/25144/3//COMMIT_MSG@20 PS3, Line 20: A ParseException is thrown and the message is caught an the Unsupported exception > Nit: an -> and ("... the message is caught and the Unsupported ...") Done https://gerrit.cloudera.org/#/c/25144/3/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java File fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java: https://gerrit.cloudera.org/#/c/25144/3/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@a512 PS3, Line 512: > This got cut off accidentally Done https://gerrit.cloudera.org/#/c/25144/3/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@527 PS3, Line 527: triggred > Nit: triggered Done https://gerrit.cloudera.org/#/c/25144/3/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@530 PS3, Line 530: !analysisResult_.shouldFallbackBecauseOfException(analysisException) > So, every UnsupportedFeatureException MUST fall back. There is no mode that This is correct. https://gerrit.cloudera.org/#/c/25144/3/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: https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@107 PS3, Line 107: List<String> notFoundTables = new ArrayList<>(); > This is now unused Done https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@310 PS3, Line 310: String onlyColumnPart = columnName.split("\\.")[0].toLowerCase(); : if (onlyColumnPart.toLowerCase().equals("_file_row_id")) { > Extra toLowerCase() call Done https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java: https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java@91 PS3, Line 91: catch (Exception e) { : if (e instanceof ImpalaException) { : throw (ImpalaException) e; : } else if (e instanceof InconsistentMetadataFetchException) { : throw (InconsistentMetadataFetchException) e; : } else { : throw new RuntimeException(e); : } : } > Claude says this try/catch isn't doing anything. Done https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java: https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@182 PS3, Line 182: "UnsupportedFeatureException > Nit: Opening quote with no closing quote Done https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/UnsupportedChecker.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/UnsupportedChecker.java: https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/UnsupportedChecker.java@63 PS3, Line 63: e.getMessage().equals("Unnest function found" > If getMessage() is null, this would produce a null pointer exception. An al Done https://gerrit.cloudera.org/#/c/25144/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/UnsupportedChecker.java@109 PS3, Line 109: throw new UnsupportedFeatureException( : "Complex column " + m.group(1) + " not supported."); > Nit (from Claude): We now throw UnsupportedFeatureException for things othe Done -- To view, visit https://gerrit.cloudera.org/25144 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I037d636064c4c99131598b7424dd99e4ad56d30f Gerrit-Change-Number: 25144 Gerrit-PatchSet: 3 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[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: Mon, 02 Nov 2026 15:22:41 +0000 Gerrit-HasComments: Yes
