[ 
https://issues.apache.org/jira/browse/ARROW-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419800#comment-16419800
 ] 

ASF GitHub Bot commented on ARROW-2368:
---------------------------------------

vkorukanti opened a new pull request #1809: ARROW-2368: [JAVA] Correctly pad 
negative values in DecimalVector#setBigEndian
URL: https://github.com/apache/arrow/pull/1809
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> DecimalVector#setBigEndian is not padding correctly for negative values
> -----------------------------------------------------------------------
>
>                 Key: ARROW-2368
>                 URL: https://issues.apache.org/jira/browse/ARROW-2368
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java - Vectors
>            Reporter: Venki Korukanti
>            Assignee: Venki Korukanti
>            Priority: Blocker
>              Labels: pull-request-available
>
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to