Aman Sinha has posted comments on this change. ( http://gerrit.cloudera.org:8080/23516 )
Change subject: IMPALA-14405: Labels for Calcite expressions not matching original planner ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/23516/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23516/2//COMMIT_MSG@18 PS2, Line 18: modulei nit: typo 'modulei' . Also, test suites are you referring to that contain many tests for labels ? Would be good to mention the name of couple of test suites that test this patch. http://gerrit.cloudera.org:8080/#/c/23516/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java: http://gerrit.cloudera.org:8080/#/c/23516/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java@179 PS2, Line 179: if (fieldName.startsWith("EXPR$")) { One of the pros of the EXPR$ label is that it generates unique names. SELECT 1+1, 1+1 will be EXPR$0, EXPR$1 etc. With the modified naming, we would be generating the duplicate labels. For a SELECT query it should be ok but for a CTAS it would give an error since one cannot have duplicate column names. Not sure if any code change is needed but a test with duplicate expressions would be good. http://gerrit.cloudera.org:8080/#/c/23516/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java@184 PS2, Line 184: fieldName = selectItem.toSqlString(PostgresqlSqlDialect.DEFAULT).getSql(); : } : fieldNamesBuilder.add(fieldName.toLowerCase( These 2 things seem important : the use of Postgres dialect to get the field name and the fact that it is always lowercase. Does Postgres dialect match Impala's field names always ? In the source code, the parser and backend has references to MySQL. -- To view, visit http://gerrit.cloudera.org:8080/23516 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd3e6366a284f53807b4b2c42efafa279249c1ea Gerrit-Change-Number: 23516 Gerrit-PatchSet: 2 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: Riza Suminto <[email protected]> Gerrit-Comment-Date: Wed, 15 Oct 2025 18:48:47 +0000 Gerrit-HasComments: Yes
