Steve Carlin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24218 )
Change subject: IMPALA-14912: Calcite Planner: Fix date string parsing ...................................................................... IMPALA-14912: Calcite Planner: Fix date string parsing This commit fixes parsing for the following date strings SQL select DATE '1999-01-01'; select DATE "1999-01-01"; This essentially reverts an earlier fix, IMPALA-13525, which was way more complicated than it needed to be. The Impala StringLiteral already handles escaped strings, so there is no need to remove the escapes within the Calcite parser. The changes in Parser.jj reflect the major part of the reversion, as well as removing the ParserUtil.java file. A change also had to be made in the ImpalaRexExecutor where the constant folding was done. This completes the UTF-8 constant folding commit for the Calcite Planner (IMPALA-10349) One more change was made with the unhex function. Unhex can return a non-UTF8 string. Impala can handle this in a StringLiteral, but Calcite cannot. Because of this, the constant folding for unhex when the string is non-UTF8 is done at physical node creation time rather than during the optimization phase. Change-Id: Ia08071193f86423a0e548c6b6690993afdad6272 Reviewed-on: http://gerrit.cloudera.org:8080/24218 Reviewed-by: Aman Sinha <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java M java/calcite-planner/src/main/codegen/templates/Parser.jj M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexCallConverter.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexLiteralConverter.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaValuesRel.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaRexExecutor.java D java/calcite-planner/src/main/java/org/apache/impala/calcite/util/ParserUtil.java M testdata/workloads/functional-query/queries/QueryTest/calcite.test 8 files changed, 95 insertions(+), 222 deletions(-) Approvals: Aman Sinha: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/24218 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia08071193f86423a0e548c6b6690993afdad6272 Gerrit-Change-Number: 24218 Gerrit-PatchSet: 12 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Reviewer: Xuebin Su <[email protected]>
