[ 
https://issues.apache.org/jira/browse/DRILL-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mehant Baid updated DRILL-1980:
-------------------------------
    Attachment: DRILL-1980.patch

[~jaltekruse] please review≈

> Create table with a Cast to interval day results in a file which cannot be 
> read
> -------------------------------------------------------------------------------
>
>                 Key: DRILL-1980
>                 URL: https://issues.apache.org/jira/browse/DRILL-1980
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Parquet
>    Affects Versions: 0.7.0
>            Reporter: Ramana Inukonda Nagaraj
>            Assignee: Mehant Baid
>             Fix For: 1.0.0
>
>         Attachments: DRILL-1980.patch, alltypes.json, 
> parquet_all_types.parquet
>
>
> Created a parquet file from a json file with all types listed in it.
> {code}
> 0: jdbc:drill:> CREATE TABLE parquet_all_types AS SELECT cast( INT_col as 
> int) INT_col,cast( BIGINT_col as bigint) BIGINT_col,cast( DECIMAL9_col as 
> decimal) DECIMAL9_col,cast( DECIMAL18_col as decimal(18,9)) 
> DECIMAL18_col,cast( DECIMAL28SPARSE_col as decimal(28, 14)) 
> DECIMAL28SPARSE_col,cast( DECIMAL38SPARSE_col as decimal(38, 19)) 
> DECIMAL38SPARSE_col,cast( DATE_col as date) DATE_col,cast( TIME_col as time) 
> TIME_col,cast( TIMESTAMP_col as timestamp) TIMESTAMP_col,cast( FLOAT4_col as 
> float) FLOAT4_col,cast( FLOAT8_col as double) FLOAT8_col,cast( BIT_col as 
> boolean) BIT_col,cast( VARCHAR_col as varchar(65000)) VARCHAR_col,cast( 
> VAR16CHAR_col as varchar(65000)) VAR16CHAR_col,cast( VARBINARY_col as 
> varbinary(65000)) VARBINARY_col,cast( INTERVALYEAR_col as interval year) 
> INTERVALYEAR_col,cast( INTERVALDAY_col as interval day) INTERVALDAY_col FROM 
> `/user/root/alltypes.json`;
> +------------+---------------------------+
> |  Fragment  | Number of records written |
> +------------+---------------------------+
> | 0_0        | 8                         |
> +------------+---------------------------+
> 1 row selected (0.595 seconds)
> {code}
> Tried reading created parquet file from drill. Fails with
> {code}
> 0: jdbc:drill:> explain plan for select * from 
> `/parquet_all_types/0_0_0.parquet`;
> Query failed: Query failed: Unexpected exception during fragment 
> initialization: Internal error: Error while applying rule DrillTableRule, 
> args [rel#6060:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[dfs, 
> root, /parquet_all_types/0_0_0.parquet])]
> Error: exception while executing query: Failure while executing query. 
> (state=,code=0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to