-
Notifications
You must be signed in to change notification settings - Fork 173
Reader Unit Tests #3243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Reader Unit Tests #3243
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CurtHagenlocher
pushed a commit
that referenced
this pull request
Aug 8, 2025
… and StatusPoller to Stop/Dispose Appropriately (#3217) ### Motivation The following cases are not properly stopping or disposing the status poller: 1. If the DatabricksCompositeReader is explicitly disposed by the user 2. CloudFetchReader is done returning results 3. Edge case terminal operation status (timedout_state, unknown_state) In addition: - When DatabricksOperationStatusPoller.Dispose(), it may cancel the GetOperationStatusRequest in the client. If the input buffer has data and cancellation is triggered, it leaves the TCLI client with unconsumed/unsent data in the buffer, breaking subsequent requests (fixed in this PR) ### Fixes DatabricksOperationStatusPollerLogic is now more appropriately managed by DatabricksCompositeReader (moved out of BaseDatabricksReader) to handle all cases where null results (indicating completion) are returned. Disposing DatabricksCompositeReader appropriately disposes the activeReader and statusPoller #### TODO Follow-up PR - when statement is disposed, it should also dispose the reader (the poller is currently stopped when operationhandle is set to null, but this should also happen explicitly) Need add some unit testing (follow up pr: #3243)
ianmcook
pushed a commit
to adbc-drivers/databricks
that referenced
this pull request
Oct 22, 2025
… and StatusPoller to Stop/Dispose Appropriately (#3217) ### Motivation The following cases are not properly stopping or disposing the status poller: 1. If the DatabricksCompositeReader is explicitly disposed by the user 2. CloudFetchReader is done returning results 3. Edge case terminal operation status (timedout_state, unknown_state) In addition: - When DatabricksOperationStatusPoller.Dispose(), it may cancel the GetOperationStatusRequest in the client. If the input buffer has data and cancellation is triggered, it leaves the TCLI client with unconsumed/unsent data in the buffer, breaking subsequent requests (fixed in this PR) ### Fixes DatabricksOperationStatusPollerLogic is now more appropriately managed by DatabricksCompositeReader (moved out of BaseDatabricksReader) to handle all cases where null results (indicating completion) are returned. Disposing DatabricksCompositeReader appropriately disposes the activeReader and statusPoller #### TODO Follow-up PR - when statement is disposed, it should also dispose the reader (the poller is currently stopped when operationhandle is set to null, but this should also happen explicitly) Need add some unit testing (follow up pr: apache/arrow-adbc#3243)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes to make DatabricksCompositeReader Unit tests. Should make unit tests for DatabricksReader easier, too.
Changes made: