Gabor Kaszab has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14665 )
Change subject: IMPALA-9131: Use single quotes around FORMAT clause in CAST ...................................................................... IMPALA-9131: Use single quotes around FORMAT clause in CAST When running a CAST(..FORMAT..) query then the header of the output shows the value of the FORMAT clause surrounded by double quotes. However, the SQL way is to use single quotes for strings so this patch changes the printout from using double quotes to use single quotes instead. Additionally, this fixes a bug where it wasn't possible to have a single quote separator in a format string that was itself surrounded by single quotes. As a fix the single quote separator can be escaped by a backslash in this case. Another additional fix to make the FX modifier case-insensitive. Change-Id: I3310abfa6f3ccbbe4c437846c6dd05791153e6f7 Reviewed-on: http://gerrit.cloudera.org:8080/14665 Reviewed-by: Attila Jeges <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/runtime/datetime-iso-sql-format-parser.cc M be/src/runtime/datetime-iso-sql-format-tokenizer.cc M be/src/runtime/datetime-iso-sql-format-tokenizer.h M fe/src/main/java/org/apache/impala/analysis/CastExpr.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java M tests/query_test/test_cast_with_format.py 6 files changed, 142 insertions(+), 15 deletions(-) Approvals: Attila Jeges: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/14665 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3310abfa6f3ccbbe4c437846c6dd05791153e6f7 Gerrit-Change-Number: 14665 Gerrit-PatchSet: 7 Gerrit-Owner: Gabor Kaszab <[email protected]> Gerrit-Reviewer: Anonymous Coward (536) Gerrit-Reviewer: Attila Jeges <[email protected]> Gerrit-Reviewer: Gabor Kaszab <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Norbert Luksa <[email protected]>
