Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.12.0
-
None
-
ghx-label-9
Description
Expression rewriting seems to identify this as a redundant cast and removes it.
Steps to re-create:
select * from (select cast('2018-12-11 09:59:37' as timestamp) as ts) tbl where cast(ts as varchar(10)) = '2018-12-11';
output:
Fetched 0 row(s)
Now disable expression re-writes.
set ENABLE_EXPR_REWRITES=false; select * from (select cast('2018-12-11 09:59:37' as timestamp) as ts) tbl where cast(ts as varchar(10)) = '2018-12-11';
output:
+---------------------+ | ts | +---------------------+ | 2018-12-11 09:59:37 | +---------------------+
Attachments
Issue Links
- relates to
-
IMPALA-5929 Remove useless explicit casts to string
- Reopened