You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Volodymyr Vysotskyi (JIRA)" <ji...@apache.org> on 2018/05/04 08:51:00 UTC

[jira] [Assigned] (DRILL-5390) Casting as decimal does not make drill use the decimal value vector

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

Volodymyr Vysotskyi reassigned DRILL-5390:
------------------------------------------

    Assignee: Volodymyr Vysotskyi

> Casting as decimal does not make drill use the decimal value vector
> -------------------------------------------------------------------
>
>                 Key: DRILL-5390
>                 URL: https://issues.apache.org/jira/browse/DRILL-5390
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.11.0
>            Reporter: Rahul Challapalli
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>
> The below query should be using the decimal value vector. However it looks like it is using the float vector. If we feed the output of the below query to a CTAS statement then the parquet file created has a double type instead of a decimal type
> {code}
> alter session set `planner.enable_decimal_data_type` = true;
> +-------+--------------------------------------------+
> |  ok   |                  summary                   |
> +-------+--------------------------------------------+
> | true  | planner.enable_decimal_data_type updated.  |
> +-------+--------------------------------------------+
> 1 row selected (0.39 seconds)
> 0: jdbc:drill:zk=10.10.100.190:5181> select typeof(col2) from (select 1 as col1, cast(2.0 as decimal(9,2)) as col2, cast(3.0 as decimal(9,2)) as col3 from cp.`tpch/lineitem.parquet` limit 1) d;
> +---------+
> | EXPR$0  |
> +---------+
> | FLOAT8  |
> +---------+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)