Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24208 )
Change subject: IMPALA-14903: Calcite planner: Simplify code for string literals ...................................................................... Patch Set 11: (1 comment) http://gerrit.cloudera.org:8080/#/c/24208/8/java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexLiteralConverter.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexLiteralConverter.java: http://gerrit.cloudera.org:8080/#/c/24208/8/java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexLiteralConverter.java@99 PS8, Line 99: ImpalaTypeConverter.createImpalaType(rexLiteral.getType()), false); > This code should only kick in if there is an explicit cast to CHAR or VARCH I think Calcite could generate CHAR expressions during optimization. E.g. for "LIKE(string, '0%')", the constant is using CHAR(2) type. Also see this in tpch queries like tpch-q2 that has LIKE predicates. However, the resolved function is still "like(STRING, STRING)" so we won't have codegen issue due to CHAR not supported in this case. Also verified the InPredicate always use STRING type. So we can resolve this. -- To view, visit http://gerrit.cloudera.org:8080/24208 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id8e61b2555afd81ef52f19431fdd1224d4039c00 Gerrit-Change-Number: 24208 Gerrit-PatchSet: 11 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Mon, 08 Jun 2026 06:03:34 +0000 Gerrit-HasComments: Yes
