Zoltan Borok-Nagy has posted comments on this change. ( 
https://gerrit.cloudera.org/25415 )

Change subject: IMPALA-15774: Decode SQL string escapes before Calcite 
simplification
......................................................................


Patch Set 6:

(3 comments)

Thanks for working on this! Checked with Opus 5.5.

https://gerrit.cloudera.org/#/c/25415/6//COMMIT_MSG
Commit Message:

https://gerrit.cloudera.org/#/c/25415/6//COMMIT_MSG@14
PS6, Line 14:
The Kudu/HBase/DataSource changes also fix the original planner. On master, 
select count(*) from functional_kudu.alltypestiny where string_col = 
concat(chr(92), '061') returns 4 (HDFS returnsĀ 0), because the folded value is 
unescaped again. Could you mention this and add a Kudu test, including 
string_col = '\\061' under Calcite?


https://gerrit.cloudera.org/#/c/25415/6//COMMIT_MSG@30
PS6, Line 30:    IMPALA-15753 LIKE cases still match the original planner.
calcite.test has no IMPALA-15753 cases, since that CR was abandoned. Could you 
add select count(*) from functional.alltypestiny where concat('a%', string_col) 
like 'a\\%_'?


https://gerrit.cloudera.org/#/c/25415/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java:

https://gerrit.cloudera.org/#/c/25415/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java@150
PS6, Line 150:     rexBuilder.setPostAnalysis();
Moving setPostAnalysis() makes the EXCEPT marker columns INT instead of TINYINT 
(if(=($1, 0), 1, null:INTEGER)). That breaks TpcdsCtePlannerTest q87 and 
TpcdsCpuCostPlannerTest Q87. With the call in its old place, both pass and so 
does CalciteEscapedStringLiteralTest. Is the move needed?



--
To view, visit https://gerrit.cloudera.org/25415
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2f3e3d7c152fe43feea88a97f9b4c892bee4afa4
Gerrit-Change-Number: 25415
Gerrit-PatchSet: 6
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: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Thu, 12 Nov 2026 14:37:04 +0000
Gerrit-HasComments: Yes

Reply via email to