Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5390

Casting as decimal does not make drill use the decimal value vector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.11.0
    • None
    • Execution - Data Types
    • None

    Description

      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

      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  |
      +---------+
      

      Attachments

        Issue Links

          Activity

            People

              volodymyr Vova Vysotskyi
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: