axreldable opened a new pull request, #1019:
URL: https://github.com/apache/arrow-java/pull/1019

   ## What's Changed
   
   [First 
commit](https://github.com/apache/arrow-java/commit/a758cadb17c3d50c08a139a3e2ddced71215ccf5)
 changes logic:
   
   - The PR fixes a bug in the `ListViewVector.getElementEndIndex(index)` 
method . 
   
   Before:
   ```
   public int getElementEndIndex(int index) {
     return sizeBuffer.getInt(index * OFFSET_WIDTH);
   }
   ```
   After:
   ```
   public int getElementEndIndex(int index) {
     return offsetBuffer.getInt(index * OFFSET_WIDTH) + sizeBuffer.getInt(index 
* SIZE_WIDTH);
   }
   ```
   
   [Second 
commit](https://github.com/apache/arrow-java/commit/aec29750202ff1aac73e7fdc9c2020b3dcf72696)
 doesn't change logic:
   
   - Fixes a bug of usage `sizeBuffer` with `OFFSET_WIDTH` (`hashCode` method) 
and `offsetBuffer` with `SIZE_WIDTH` (`setSize` method). It doesn't introduce 
real changes in the logic as `OFFSET_WIDTH` == `SIZE_WIDTH` == 4
   
   - Plus small refactoring of ListViewVector to avoid code duplication and 
similar issues in the future.
   
   ---
   It's a bug fix.
   
   ---
   Closes #470.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to