impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Bobrovytsky (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2422: Fix escaping in LIKE clause
Date Fri, 11 Aug 2017 22:35:19 GMT
Taras Bobrovytsky has uploaded a new patch set (#2).

Change subject: IMPALA-2422: Fix escaping in LIKE clause
......................................................................

IMPALA-2422: Fix escaping in LIKE clause

There are two stages to processing a like clause. First, we determine if
it is possible to convert the expression to a simpler function, such as
StartsWith() or EndsWith(). If not, then we use a Regex libarary to
compute the result.

There was a problem in the logic that determines if it is possible to
use a simpler function. It did not take into account escape characters.
For example, "abc\%" was incorrectly converted to StartsWith("abc\").

Testing:
-Added expr tests.

Change-Id: Iec0f5d99c855ea8d4fe1bcf28c05780ba315034b
---
M be/src/exprs/expr-test.cc
M be/src/exprs/like-predicate.cc
2 files changed, 28 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/60/7660/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7660
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iec0f5d99c855ea8d4fe1bcf28c05780ba315034b
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>

Mime
View raw message