Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/262#discussion_r45092551
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertFrom.java
 ---
    @@ -41,6 +41,7 @@ public void eval() {
     
         in.buffer.readerIndex(in.start);
         long epochMillis = Long.reverseBytes(in.buffer.readLong());
    +    in.buffer.readerIndex(0);
    --- End diff --
    
    Imagine this case: 
    A downstream operator asks Project for producing two columns, 
convert_to(col, ...) and col. 
    
    Due to the current implementation of convert_to(), after the the 
convert_to(col, ...) evaluation is done, the readIndex in col's Drillbuf will 
be pointed at the end. 
    
    Then after the receiver uses RecordBatchLoader to read this Drillbuf, IOOB 
will be thrown
    
    



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to