Skip to content

Conversation

@toddmeng-db
Copy link
Contributor

@toddmeng-db toddmeng-db commented May 20, 2025

Handles shared reading logic (Status Polling logic) for DatabricksReader and CloudFetchReader. Also modifies polling lifecycle to begin during Reader initialization instead of first time ReadNextRecordBatchAsync is called

There is still a slight gap when we are not polling for results immediately after query execution completes (here); can be addressed in a later PR

@toddmeng-db toddmeng-db force-pushed the toddmeng-db/base-status-poller branch from 235df22 to 29bc9ff Compare May 20, 2025 20:26
@toddmeng-db toddmeng-db changed the title BaseDatabricksReader feat(csharp/src/Drivers/Databricks): BaseDatabricksReader May 20, 2025
[InlineData(true, "CloudFetch enabled")]
[InlineData(false, "CloudFetch disabled")]
[InlineData(true, "CloudFetch enabled")] // TODO: test cloudfetch disabled
public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configName)
Copy link
Contributor Author

@toddmeng-db toddmeng-db May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes cloudfetch heartbeat test: cloudfetch URLs are fetched during CloudFetchReader initialization, and the URL expire swithin 15 minutes. Delaying for 30 minutes will result in attempting to read expired urls. This makes testing this really difficult.

@jadewang-db Do we need to do anything about this url expiration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline: we'll need to seperately take a look into handling url expiration, then we should re-enable this test for cloudfetch.

@toddmeng-db toddmeng-db force-pushed the toddmeng-db/base-status-poller branch from 440c1b2 to a7d6ef3 Compare May 21, 2025 00:38
@toddmeng-db toddmeng-db marked this pull request as ready for review May 21, 2025 01:11
@github-actions github-actions bot modified the milestone: ADBC Libraries 19 May 21, 2025
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you take care of a couple of super-nitpicky formatting issues?

isDisposed = true;
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra blank line

this.schema = schema;
this.isLz4Compressed = isLz4Compressed;
this.statement = statement;
if (statement.DirectResults != null && !statement.DirectResults.ResultSet.HasMoreRows) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please put open brace on new line

@CurtHagenlocher CurtHagenlocher merged commit e08f484 into apache:main May 21, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants