Steve Carlin has uploaded this change for review. ( 
https://gerrit.cloudera.org/25372


Change subject: IMPALA-15753: Calcite planner: avoid LIKE wildcard 
simplification
......................................................................

IMPALA-15753: Calcite planner: avoid LIKE wildcard simplification

Calcite collapses adjacent LIKE percent signs, so '%%' becomes '%'.
That rewrite changes Impala's result when a backslash escape
precedes the wildcards. The pattern 'a\\%%' is not the same as
'a\\%': the extra percent sign stays a wildcard.

Skip LIKE simplification when the pattern contains a percent sign.
A pattern made only of percent signs still simplifies to "x = x".
Collapsing three percent signs to two is possible, but that edge
case is not worth the extra code.

Testing: Added LIKE expressions that previously failed to
calcite.test.

Change-Id: I93b3a7ecad92c373e79e6a5c74e25841400a56e3
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaRexSimplify.java
M testdata/workloads/functional-query/queries/QueryTest/calcite.test
2 files changed, 64 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/25372/1
--
To view, visit https://gerrit.cloudera.org/25372
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I93b3a7ecad92c373e79e6a5c74e25841400a56e3
Gerrit-Change-Number: 25372
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to