drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khurram Faraaz <kfar...@maprtech.com>
Subject Re: interval year column is represented as interval in parquet schema
Date Wed, 05 Oct 2016 17:50:54 GMT
correction.

It is INTERVAL DAY datatype that is represented as INTERVAL in the parquet
schema. Shouldn't the entry in the parquet schema be INTERVAL DAY, same as
the one used in the CTAS to create the parquet file.

Thanks,
Khurram

On Wed, Oct 5, 2016 at 7:34 PM, Khurram Faraaz <kfaraaz@maprtech.com> wrote:

> Hi All,
>
> interval year column is marked as interval in parquet schema for CTAS
> created parquet file. This is seen on Drill 1.9.0, git commit id : f3c26e34
>
> 0: jdbc:drill:schema=dfs.tmp> create table dur_day(dr_day) as select
> cast(columns[0] as* interval day*) dr_day from `duration.csv`;
> +-----------+----------------------------+
> | Fragment  | Number of records written  |
> +-----------+----------------------------+
> | 0_0       | 23                         |
> +-----------+----------------------------+
> 1 row selected (0.306 seconds)
> 0: jdbc:drill:schema=dfs.tmp> select * from dur_day;
> +--------------+
> |    dr_day    |
> +--------------+
> | P20DT4562S   |
> | P1DT29212S   |
> | P24DT8553S   |
> | P1DT36164S   |
> | P23DT4041S   |
> | P15DT5347S   |
> | P10DT36726S  |
> | P10DT12817S  |
> | P12DT43008S  |
> | P20DT9056S   |
> | P25DT41883S  |
> | P8DT4496S    |
> | P4DT24315S   |
> | P21DT21058S  |
> | P14DT16591S  |
> | P26DT4589S   |
> | P12DT18910S  |
> | P29DT24828S  |
> | P13DT16655S  |
> | P9DT34464S   |
> | P12DT6110S   |
> | P26DT16721S  |
> | P23DT20649S  |
> +--------------+
> 23 rows selected (0.133 seconds)
>
> Looking at the parquet schema for above CTAS created parquet file, we see
> that INTERVAL YEAR column is marked as INTERVAL in the parquet schema.
>
> [root@centos-01 duration]# ~/parquet-tools/parquet-schema 0_0_0.parquet
> message root {
>   optional fixed_len_byte_array(12) dr_day (INTERVAL);
> }
>
> Thanks,
> Khurram
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message