Github user jacques-n commented on a diff in the pull request:
https://github.com/apache/drill/pull/262#discussion_r45089585
--- 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 --
Can you explain why this is necessary? It seems like the issue you are
trying to resolve is related to whatever comes after this function rather than
an issue with this function. There should not guarantees about the reader index
of a Drillbuf (in fact, we should remove this from being exposed in functions).
See how this function positions the reader before doing anything else. Is there
some other operation which doesn't position the reader?
---
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.
---