[
https://issues.apache.org/jira/browse/DRILL-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14268638#comment-14268638
]
Norris Lee commented on DRILL-1955:
-----------------------------------
>From Parth:
"For the ODBC driver, would it make more sense to provide an interface in
DrillClient to get the query state from the query handle? We are already
keeping the query state in DrillClientQueryResult.
Seems like the clean thing to do.
As an aside, looking thru the code in the sync client, I see that the sync
client explicitly depends on is_last_chunk to determine the completion of the
query. However I do not free the resources until much, much later and so there
is no harm done."
Hi Parth,
It would still be preferable to have a listener callback because the state may
not be set to completed/cancelled/etc when we do the check for it, and it
wouldn't make sense to wait until it is set (plus we won't know when Drill
Client actually receives the last record batch from the server if it just
silently consumes the record batch)
> C++ Client - Drill client should provide a clean method for detecting query
> completion in the async API.
> --------------------------------------------------------------------------------------------------------
>
> Key: DRILL-1955
> URL: https://issues.apache.org/jira/browse/DRILL-1955
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - C++
> Reporter: Parth Chandra
> Assignee: Parth Chandra
>
> The C++ client swallows the query_completed status message because it has
> already signaled the end of data thru the ls_last_chunk.
> However, it may be too early for the application (or odbc driver) to free
> resources.
> The API should provide a clean method for detecting the completion of the
> query. This may include calling the listener callback one more time with no
> records, but with the query state set to completed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)