Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22828

Decimal64: NVL & CASE statements implicitly convert decimal64 to 128

    XMLWordPrintableJSON

Details

    Description

      select  
      sum(case when (ss_item_sk=1) then ss_sales_price else null end),
      sum(case when (ss_item_sk=2) then ss_sales_price else ss_sales_price+1 end),
      sum(case when (ss_item_sk=2) then 1.0BD+ss_sales_price else null end)
      from store_sales where ss_sold_date_sk % 1111 = 1;
      
      Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.vector.Decimal64ColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector
              at org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector.setElement(DecimalColumnVector.java:130)
              at org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprColumnNull.evaluate(IfExprColumnNull.java:125)
              at org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorUDAFSumDecimal.aggregateInputSelection(VectorUDAFSumDecimal.java:113)
              at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeBase.processAggregators(VectorGroupByOperator.java:221)
              at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeHashAggregate.doProcessBatch(VectorGroupByOperator.java:414)
      

      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java#L3950

      Attachments

        1. HIVE-22828.9.patch
          67 kB
          Ramesh Kumar Thangarajan
        2. HIVE-22828.8.patch
          43 kB
          Ramesh Kumar Thangarajan
        3. HIVE-22828.7.patch
          43 kB
          Ramesh Kumar Thangarajan
        4. HIVE-22828.6.patch
          52 kB
          Ramesh Kumar Thangarajan
        5. HIVE-22828.5.patch
          23 kB
          Ramesh Kumar Thangarajan
        6. HIVE-22828.4.patch
          23 kB
          Ramesh Kumar Thangarajan
        7. HIVE-22828.3.patch
          34 kB
          Ramesh Kumar Thangarajan
        8. HIVE-22828.11.patch
          118 kB
          Ramesh Kumar Thangarajan
        9. HIVE-22828.10.patch
          122 kB
          Ramesh Kumar Thangarajan
        10. HIVE-22828.1.patch
          35 kB
          Ramesh Kumar Thangarajan

        Activity

          People

            rameshkumar Ramesh Kumar Thangarajan
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h