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

FIX Arrow Decimal serialization for native VectorRowBatches

    XMLWordPrintableJSON

Details

    Description

      Arrow Serializer does not properly handle Decimal primitive values when selected array is used.
      In more detail, decimalValueSetter should be setting the value at arrowIndex[i] as the value at hiveIndex[j], however currently its using the same index!
      https://github.com/apache/hive/blob/eac25e711ea750bc52f41da7ed3c32bfe36d4f67/ql/src/java/org/apache/hadoop/hive/ql/io/arrow/Serializer.java#L926

      This works fine for cases where i == j (selected is not used) but returns wrong decimal row values when i != j.
      This ticket fixes this inconsistency and adds tests with selected indexes for all supported types

      Attachments

        1. HIVE-23561.01.patch
          14 kB
          Panagiotis Garefalakis

        Issue Links

          Activity

            People

              pgaref Panagiotis Garefalakis
              pgaref Panagiotis Garefalakis
              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 - 20m
                  20m