[ https://issues.apache.org/jira/browse/ARROW-14418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mayur Srivastava updated ARROW-14418: ------------------------------------- Description: VectorAppender uses type-width to copy the data buffer from delta vector to target vector. But, BitVector's type-width is 0, hence, its data buffer does not get copied to the target vector. The VectorAppender should be fixed to correctly handle data buffer copy for the BitVector. The current behavior is as follows: # The validity vector is correctly appended. # The data buffer is not appended. This means that is the delta vector contains 1's (true values), they are appended as false. e.g. Target BitVector = \{1, 0, null}, and Delta BitVector = \{1, 0, null}, then the result is \{1, 0, null, 0, 0, null}. <== notice the fourth element is copied as 0 (or false). The correct result is \{1, 0, null, 1, 0, null}. was: VectorAppender uses type-width to copy the data buffer from delta vector to target vector. But, BitVector's type-width is 0, hence, its data buffer does not get copied to the target vector. The VectorAppender should be fixed to correctly handle data buffer copy for the BitVector. The current behavior is as follows: # The validity vector is correctly appended. # The data buffer is not appended. This means that is the delta vector contains 1's (true values), they are appended as false. e.g. Target BitVector = \{1, 0, null}, and Delta BitVector = \{1, 0, null}, then the result is \{1, 0, null, 0, 0, null}. The > [Java] Fix VectorAppender to correctly append data buffer for BitVector > ----------------------------------------------------------------------- > > Key: ARROW-14418 > URL: https://issues.apache.org/jira/browse/ARROW-14418 > Project: Apache Arrow > Issue Type: Bug > Components: Java > Reporter: Mayur Srivastava > Priority: Major > > VectorAppender uses type-width to copy the data buffer from delta vector to > target vector. But, BitVector's type-width is 0, hence, its data buffer does > not get copied to the target vector. The VectorAppender should be fixed to > correctly handle data buffer copy for the BitVector. > The current behavior is as follows: > # The validity vector is correctly appended. > # The data buffer is not appended. > This means that is the delta vector contains 1's (true values), they are > appended as false. > e.g. > Target BitVector = \{1, 0, null}, and > Delta BitVector = \{1, 0, null}, then > the result is \{1, 0, null, 0, 0, null}. <== notice the fourth element is > copied as 0 (or false). > The correct result is \{1, 0, null, 1, 0, null}. > -- This message was sent by Atlassian Jira (v8.3.4#803005)