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 (#10). Change subject: IMPALA-3942: Fix wrongly escaped string literal in front-end ...................................................................... IMPALA-3942: Fix wrongly 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. e.g. concat('a', "b") 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) to single quotes. Testing: Added unit tests into expr-test, ToSqlTest Change-Id: Ibc4b5f5d8ffaa8feb96a466959427a04b3b06fec --- M be/src/exprs/expr-test.cc M fe/src/main/java/org/apache/impala/analysis/StringLiteral.java M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java 3 files changed, 93 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/18/8818/10 -- 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: 10 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>