Rahul Challapalli created DRILL-5390:
----------------------------------------

             Summary: 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
    Affects Versions: 1.11.0
            Reporter: Rahul Challapalli



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
(v6.3.15#6346)

Reply via email to