Joe McDonnell has posted comments on this change. ( https://gerrit.cloudera.org/25144 )
Change subject: IMPALA-14944: Calcite fallback via UnsupportedFeatureException ...................................................................... Patch Set 4: (1 comment) 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@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()); : } A couple things: 1. This code doesn't understand aliases in the query. For example: "FROM db.tbl t, t.arr_col" or inline views, etc. It's actually quite complicated. We need to decide whether this change should try to handle it. 2. I was thinking about 3-part identifiers and whether table.struct_col.array_col would work here, but that actually isn't a problem: identifiers with 3 parts are rejected in CalciteMetadataHandler.java:228-233, so I think they won't arrive here 3. There is some ambiguity around foo.bar where it could be db=foo,table=bar or it could be db=current_db,table=foo,column=bar. This would fall back to the original planner, so that doesn't seem too concerning. -- 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: Mon, 02 Nov 2026 20:00:19 +0000 Gerrit-HasComments: Yes
