drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StevenMPhillips <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3854: For convert_from, re-point readerI...
Date Tue, 17 Nov 2015 21:31:21 GMT
Github user StevenMPhillips commented on a diff in the pull request:

    https://github.com/apache/drill/pull/262#discussion_r45124172
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/record/WritableBatch.java
---
    @@ -149,6 +149,7 @@ public static WritableBatch getBatchNoHV(int recordCount, Iterable<ValueVector>
           }
     
           for (DrillBuf b : vv.getBuffers(true)) {
    +        b.readerIndex(0);
    --- End diff --
    
    Yes, I think that is correct. It should be outside the if (clear) block.
    
    On Tue, Nov 17, 2015 at 1:07 PM, Jacques Nadeau <notifications@github.com>
    wrote:
    
    > In
    > exec/java-exec/src/main/java/org/apache/drill/exec/record/WritableBatch.java
    > <https://github.com/apache/drill/pull/262#discussion_r45120761>:
    >
    > > @@ -149,6 +149,7 @@ public static WritableBatch getBatchNoHV(int recordCount,
Iterable<ValueVector>
    > >        }
    > >
    > >        for (DrillBuf b : vv.getBuffers(true)) {
    > > +        b.readerIndex(0);
    >
    > I believe the contract of getBuffers() is that buffers are returned in a
    > reader appropriate state. As such, you should figure out which buffers are
    > failing to guarantee this. It should be easy as there are only a small
    > amount of implementations of this. In other words, where are we failing to
    > ensure this?
    >
    > Given the code I looked at before, I think the problem may be that the
    > readerIndex behavior is only inside the clear statement. @StevenMPhillips
    > <https://github.com/StevenMPhillips> , it seems like this line:
    > https://github.com/apache/drill/blame/master/exec/vector/src/main/java/org/apache/drill/exec/vector/BaseDataValueVector.java#L63
    > should be outside the if(clear). Thoughts?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/drill/pull/262/files#r45120761>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message