Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.10.0
-
None
-
None
-
Drill 1.10
Description
Following example shows an exception thrown by a CAST from TIME to TIMESTAMP when data in a parquet file is accessed via a view.
ALTER SESSION SET `store.format`='parquet';
use dfs.certp
create table dfs.certp.`/data/ttm` as
select cast(RNUM as integer) RNUM, cast( CTM as TIME) CTM from
(
values
( 0, cast(NULL as varchar)),
( 1, '00:00:00'),
( 2, '12:00:00'),
( 3, '23:59:30')
) T (RNUM, CTM)
refresh table metadata dfs.certp.`/data`
create or replace view TTM as select cast(RNUM as integer) RNUM, cast ( CTM as time ) CTM from dfs.certp.`/data/ttm`;
select RNUM, CAST ( CTM as TIMESTAMP ) from TTM
Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "00:00:00.000" is malformed at ":00:00.000"
meanwhile this does not throw the exception
select RNUM, CAST( CAST ( CTM as TIME) as TIMESTAMP) CTM from
(
values
( 0, cast(NULL as varchar)),
( 1, '00:00:00'),
( 2, '12:00:00'),
( 3, '23:59:30')
) T (RNUM, CTM)