drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "N Campbell (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5646) IllegalArgumentException: Invalid format: "00:00:00.000" is malformed at ":00:00.000"
Date Sat, 01 Jul 2017 12:01:04 GMT
N Campbell created DRILL-5646:
---------------------------------

             Summary: IllegalArgumentException: Invalid format: "00:00:00.000" is malformed
at ":00:00.000"
                 Key: DRILL-5646
                 URL: https://issues.apache.org/jira/browse/DRILL-5646
             Project: Apache Drill
          Issue Type: Bug
          Components:  Server
    Affects Versions: 1.10.0
         Environment: Drill 1.10
            Reporter: N Campbell


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)




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message