Github user parthchandra commented on the issue:
https://github.com/apache/drill/pull/858
Been looking at this and the first thing that occurs to me is that we are
not too clear about what the timeout means in the context of ResultSet. The API
specification is rather silent on that topic.
The only reference I could find to this question is this one:
http://mail-archives.apache.org/mod_mbox/db-derby-dev/200504.mbox/%[email protected]%3E
We have the same choices:
> 1. setQueryTimeout() only affects Statement.execute()
> 2. setQueryTimeout() affects Statement.execute() and
ResultSet.next(),starting from zero for each invocation
> 3. setQueryTimeout() affects Statement.execute() and
ResultSet.next(),accumulating time spent in each invocation
My own inclination was to select #2 as the appropriate behavior. In fact
that is what I assumed before I looked at the code. Laurent's suggestion to
implement the timeout in DrillCursor provides this behavior and is a little bit
easier to implement.
OTOH, Kunal has chosen #3 as the right behavior. MySQL implements this
behavior, BTW, so it is not going to be a surprise to end users. And he has
already done the work.
I'm +0 on this so far. Let me see if I can get a quick prototype to test
things out.
---
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.
---