Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2368

DecimalVector#setBigEndian is not padding correctly for negative values

    Details

      Description

      If the input given is less than 16 bytes, we pad zero for the remaining bytes [1]. This is not correct if the value is a negative number. We should pad 0x00 or 0xFF depending upon the number is a positive or negative number. Later when the value is retrieved we end up with an incorrect value.

       

      [1] https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/DecimalVector.java#L231

        Attachments

          Activity

            People

            • Assignee:
              vkorukanti Venki Korukanti
              Reporter:
              vkorukanti Venki Korukanti
            • Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                40m