Steve Carlin has posted comments on this change. ( https://gerrit.cloudera.org/25144 )
Change subject: IMPALA-14944: Calcite fallback via UnsupportedFeatureException ...................................................................... Patch Set 4: (3 comments) https://gerrit.cloudera.org/#/c/25144/4/java/calcite-planner/src/main/codegen/templates/Parser.jj File java/calcite-planner/src/main/codegen/templates/Parser.jj: https://gerrit.cloudera.org/#/c/25144/4/java/calcite-planner/src/main/codegen/templates/Parser.jj@2267 PS4, Line 2267: <TABLESAMPLE> { if (true) throw new ParseException("tablesample not supported."); } > Why `if (true)`? Removed https://gerrit.cloudera.org/#/c/25144/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ComplexTableDetector.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ComplexTableDetector.java: https://gerrit.cloudera.org/#/c/25144/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ComplexTableDetector.java@40 PS4, Line 40: * ComplexTableDetector searches the AST for Impala-specific complex-type : * FROM syntax. Impala allows the : * complex type to be in the from clause which will essentially perform the : * unnest function (e.g. select item from complextbl, complextbl.array_col). : * If this is detected in the AST, an UnsupportedFeatureException will be thrown : * so that the original planner can handle the query. > Hmm, should we add a bit to the comment to note that some cases are handled Done https://gerrit.cloudera.org/#/c/25144/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ComplexTableDetector.java@95 PS4, Line 95: private boolean tableAndComplexColumnExists(List<String> tableStringList) { : Preconditions.checkState(tableStringList.size() >= 2); : int arrayOffset = 0; : String dbName = tableStringList.size() == 2 : ? currentDb_ : : tableStringList.get(arrayOffset++).toLowerCase(); : FeDb db = catalog_.getDb(dbName); : if (db == null) { : return false; : } : FeTable feTable = db.getTable(tableStringList.get(arrayOffset++).toLowerCase()); : if (feTable == null) { : return false; : } : return feTable.getColumnNames().contains( : tableStringList.get(arrayOffset).toLowerCase()); : } > Since CalciteTable.java throws when a table has complex types, the alias ca Ack. Also keep in mind that in the near future, complex types will be supported more, so things that are unsupported will be more granular. -- 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: 4 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: Tue, 03 Nov 2026 22:11:06 +0000 Gerrit-HasComments: Yes
