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

ASF GitHub Bot commented on DRILL-6486:
---------------------------------------

bitblender commented on a change in pull request #1316: DRILL-6486: BitVector 
split and transfer does not work correctly for non byte-multiple transfer 
lengths
URL: https://github.com/apache/drill/pull/1316#discussion_r195195383
 
 

 ##########
 File path: 
exec/vector/src/main/java/org/apache/drill/exec/vector/BitVector.java
 ##########
 @@ -285,35 +285,55 @@ public void transferTo(BitVector target) {
 
   public void splitAndTransferTo(int startIndex, int length, BitVector target) 
{
     assert startIndex + length <= valueCount;
-    int firstByte = getByteIndex(startIndex);
-    int byteSize = getSizeFromCount(length);
-    int offset = startIndex % 8;
-    if (offset == 0) {
+    int firstByteIndex = getByteIndex(startIndex);//byte offset of the first 
src byte
+    int bytesToRead = getSizeFromCount(length); //src bytes to read (including 
start/end bytes that might not be fully copied)
 
 Review comment:
   Agreed. Changing it to 'numBytesHoldingSourceBits'

----------------------------------------------------------------
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


> BitVector split and transfer does not work correctly for non byte-multiple 
> transfer lengths
> -------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6486
>                 URL: https://issues.apache.org/jira/browse/DRILL-6486
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.13.0
>            Reporter: Karthikeyan Manivannan
>            Assignee: Karthikeyan Manivannan
>            Priority: Major
>             Fix For: 1.14.0
>
>         Attachments: TestSplitAndTransfer.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> BitVector splitAndTransfer does not correctly handle transfers where the 
> transfer-length is not a multiple of 8. The attached bitVector tests will 
> expose this problem. 



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

Reply via email to