Hello Thomas Tauber-Marshall, Gabor Kaszab, Jim Apple, Tim Armstrong, Alex Behm,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8818

to look at the new patch set (#3).

Change subject: IMPALA-3942: Fix wronly escaped string literal in front-end
......................................................................

IMPALA-3942: Fix wronly escaped string literal in front-end

String literal can be wrapped by either single or double quotes.
There are some holes in escaping the string literal:
- toSql() always returns strings that are single quoted, resulting in
improper escaping in the output if the original string was actually
double quoted.
- It is not always possible to determine if a string "should" be single
or double quoted, eg concat('a', "b") and that's why we just choose one
to always normalize to.

The solution is to normalize any string which comes from user's given
string or a generated string (e.g. constant fold by the rewritter rule).

Testing:
Add some test cases to TestEscapingStringLiteral

Change-Id: Ibc4b5f5d8ffaa8feb96a466959427a04b3b06fec
---
M fe/src/main/java/org/apache/impala/analysis/StringLiteral.java
M tests/query_test/test_queries.py
2 files changed, 115 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/18/8818/3
--
To view, visit http://gerrit.cloudera.org:8080/8818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibc4b5f5d8ffaa8feb96a466959427a04b3b06fec
Gerrit-Change-Number: 8818
Gerrit-PatchSet: 3
Gerrit-Owner: Kim Jin Chul <jinc...@gmail.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-imp...@apache.org>
Gerrit-Reviewer: Kim Jin Chul <jinc...@gmail.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to