impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Jin Chul (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3942: Fix wronly escaped string literal in front-end
Date Mon, 08 Jan 2018 01:20:19 GMT
Hello Thomas Tauber-Marshall, Gabor Kaszab, Jim Apple, Tim Armstrong, Alex Behm, 

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

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).

Add some test cases to TestEscapingStringLiteral

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

  git pull ssh:// refs/changes/18/8818/3
To view, visit
To unsubscribe, visit

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 <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Gabor Kaszab <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Kim Jin Chul <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Tim Armstrong <>

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message