Skip to content

feat: Add support for disabling CloudFetch via EnableQueryResultDownload parameter - #1183

Merged
vikrantpuppala merged 3 commits into
databricks:mainfrom
vikrantpuppala:feat/cloud-fetch-enabled-param
Jan 19, 2026
Merged

vikrantpuppala merged 3 commits into
databricks:mainfrom
vikrantpuppala:feat/cloud-fetch-enabled-param

Conversation

@vikrantpuppala

@vikrantpuppala vikrantpuppala commented Jan 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add support for disabling CloudFetch via EnableQueryResultDownload=0 connection parameter to use inline Arrow results instead.

Changes

  • Add isCloudFetchEnabled() method to IDatabricksConnectionContext interface
  • Implement the method in DatabricksConnectionContext using existing EnableQueryResultDownload parameter
  • Update DatabricksThriftServiceClient to respect this setting when making execute requests
  • Add unit tests for the new functionality

Usage

To disable CloudFetch and use inline Arrow results:

jdbc:databricks://host:port/default;EnableQueryResultDownload=0;...

Copilot AI review requested due to automatic review settings January 19, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enables users to toggle between CloudFetch (URL-based result download) and inline Arrow results by exposing the existing EnableQueryResultDownload connection parameter through a new API method. The implementation maintains backward compatibility with the default behavior (CloudFetch enabled).

Changes:

  • Added isCloudFetchEnabled() method to the connection context interface and implementation
  • Updated the Thrift service client to use the new method when setting the canDownloadResult flag
  • Added comprehensive test coverage for both enabled and disabled CloudFetch scenarios

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/java/com/databricks/jdbc/api/internal/IDatabricksConnectionContext.java Added interface method isCloudFetchEnabled() with clear documentation explaining CloudFetch behavior
src/main/java/com/databricks/jdbc/api/impl/DatabricksConnectionContext.java Implemented isCloudFetchEnabled() method using the existing ENABLE_CLOUD_FETCH parameter
src/main/java/com/databricks/jdbc/dbclient/impl/thrift/DatabricksThriftServiceClient.java Updated to call isCloudFetchEnabled() when setting canDownloadResult for protocols that support CloudFetch
src/test/java/com/databricks/jdbc/api/impl/DatabricksConnectionContextTest.java Added comprehensive test covering default value, URL parameter, and Properties-based configuration
src/test/java/com/databricks/jdbc/dbclient/impl/thrift/DatabricksThriftServiceClientTest.java Updated existing tests to mock isCloudFetchEnabled() and added new test for CloudFetch disabled scenario
NEXT_CHANGELOG.md Documented the new feature in the changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vikrantpuppala vikrantpuppala changed the title Allow toggling between cloudfetch and inline arrow via EnableQueryResultDownload flag feat: Add support for disabling CloudFetch via EnableQueryResultDownload parameter Jan 19, 2026
Add isCloudFetchEnabled() method to IDatabricksConnectionContext interface
and DatabricksConnectionContext implementation. This exposes the existing
EnableQueryResultDownload parameter through the connection context API.

The DatabricksThriftServiceClient now uses this method to dynamically
control whether CloudFetch (URL-based result download) is enabled when
making execute requests to the server.

This allows toggling between CloudFetch results and inline Arrow results
via the existing EnableQueryResultDownload connection parameter.

Signed-off-by: Vikrant Puppala <[email protected]>
@vikrantpuppala
vikrantpuppala force-pushed the feat/cloud-fetch-enabled-param branch from e0d9cb9 to 0c7b315 Compare January 19, 2026 11:32
@vikrantpuppala
vikrantpuppala force-pushed the feat/cloud-fetch-enabled-param branch from 0c7b315 to 1619964 Compare January 19, 2026 11:34
@vikrantpuppala
vikrantpuppala merged commit 9c9ffe2 into databricks:main Jan 19, 2026
13 checks passed
vikrantpuppala added a commit to vikrantpuppala/databricks-jdbc that referenced this pull request Jan 20, 2026
Merge latest main branch to incorporate CloudFetch disable feature (PR databricks#1183)

Signed-off-by: Vikrant Puppala <[email protected]>
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