Michael Smith has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/24048 )
Change subject: IMPALA-14639: Calcite planner should not allow date cast to int
......................................................................
IMPALA-14639: Calcite planner should not allow date cast to int
The following query was passing before this commit (but now
fails correctly):
select cast(date '2000-12-21' as int);
Testing: Added test to calcite.test, also, tests exist in
test_date_queries.TestDateQueriesAllFormat.test_queries
Change-Id: Icad76e6c1db489ecdfa620109baa47232331a42d
Reviewed-on: http://gerrit.cloudera.org:8080/24048
Reviewed-by: Michael Smith <[email protected]>
Reviewed-by: Aman Sinha <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/CastExpr.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexCallConverter.java
M testdata/workloads/functional-query/queries/QueryTest/calcite.test
3 files changed, 45 insertions(+), 21 deletions(-)
Approvals:
Michael Smith: Looks good to me, but someone else must approve
Aman Sinha: Looks good to me, approved
Impala Public Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/24048
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icad76e6c1db489ecdfa620109baa47232331a42d
Gerrit-Change-Number: 24048
Gerrit-PatchSet: 2
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>