Change UseQueryForMetadata default to 1 (SHOW commands)#1413
Merged
gopalldb merged 20 commits intodatabricks:mainfrom Apr 21, 2026
Merged
Change UseQueryForMetadata default to 1 (SHOW commands)#1413gopalldb merged 20 commits intodatabricks:mainfrom
gopalldb merged 20 commits intodatabricks:mainfrom
Conversation
- Drop Windows from cache warmer matrix — Windows runners in
databricks-protected-runner-group lack bash (command not found)
- Remove runner.os from cache key — Maven JARs/POMs are platform-
independent, so one cache entry serves both Linux and Windows
- Cache key is now: maven-deps-{hash(pom.xml)}
Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
Co-authored-by: Isaac
Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
Thrift-mode metadata operations now use SQL SHOW commands by default instead of native Thrift RPCs, aligning behavior with SEA mode for seamless protocol switching. Key behavioral changes: - Catalog parameter treated as literal identifier (not wildcard pattern) - Null/empty edge-case inputs return empty ResultSet (not exceptions) - getFunctions works correctly (was broken via native Thrift RPC) - Result columns return stored values (lowercase) To revert: set UseQueryForMetadata=0 in connection string. Signed-off-by: Gopal Lal <gopal.lal@databricks.com> Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
| - Added AI coding agent detection to the User-Agent header. When the driver is invoked by a known AI coding agent (e.g. Claude Code, Cursor, Gemini CLI), `agent/<product>` is appended to the User-Agent string. | ||
|
|
||
| ### Updated | ||
| - **[Breaking Change]** Thrift-mode metadata operations (`getTables`, `getColumns`, `getSchemas`, `getFunctions`, `getPrimaryKeys`, `getImportedKeys`, `getCrossReference`) now use SQL SHOW commands by default instead of native Thrift RPCs, aligning behavior with SEA mode. The `UseQueryForMetadata` connection property default changed from `0` to `1`. To revert to native Thrift RPCs, set `UseQueryForMetadata=0`. Key behavioral changes: |
Collaborator
There was a problem hiding this comment.
use StatementExecAPI instead of SEA
sreekanth-db
approved these changes
Apr 21, 2026
SHOW commands are now the default for metadata operations on SQL Warehouses. All-Purpose Clusters continue using native Thrift RPCs. Logic: if user explicitly sets UseQueryForMetadata, honour their choice for any compute type. If not set, default to SHOW commands for warehouses and native RPCs for clusters. Tests added: - ConnectionContext: 4 tests covering warehouse/cluster x default/explicit - Session: 2 tests for default metadata client selection per compute type Signed-off-by: Gopal Lal <gopal.lal@databricks.com> Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
Signed-off-by: Gopal Lal <gopal.lal@databricks.com> Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
EnableMultipleCatalogSupportIntegrationTests uses a fake Thrift server with binary protocol stubs that match on exact session handles. With UseQueryForMetadata=1, metadata operations go through SQL execution (TExecuteStatementReq with SHOW commands) which can't be reliably replayed because session handles differ between recording and replay. Fix: explicitly set UseQueryForMetadata=0 since these tests validate enableMultipleCatalogSupport behavior, not the SHOW commands path. Signed-off-by: Gopal Lal <gopal.lal@databricks.com> Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
23c6a50 to
9490337
Compare
gopalldb
added a commit
to gopalldb/databricks-jdbc
that referenced
this pull request
Apr 27, 2026
) ## Summary Change the default value of `UseQueryForMetadata` from `0` to `1`, making SQL SHOW commands the default for Thrift-mode metadata operations instead of native Thrift RPCs. This aligns Thrift metadata behavior with SEA mode for seamless server-side protocol switching. ## Breaking Change This is a **breaking change** for users who depend on Thrift-native metadata behavior. Key differences: - Catalog parameter is now a literal identifier (not a wildcard pattern) per JDBC spec - Methods that threw exceptions for null/empty inputs now return empty result sets - `getFunctions` now works (was broken via native Thrift RPC) - Result columns return stored values (lowercase) instead of preserving input case **To revert:** set `UseQueryForMetadata=0` in the connection string. ## Readiness - Comparator analysis complete (Apr 8-16, 2026) — all gaps resolved - Merged PRs: databricks#1387 (GEOMETRY/GEOGRAPHY types), databricks#1388 (VARIANT className), databricks#1390 (null key params), databricks#1411 (case-sensitive cross reference filter) ## Test plan - [x] Comparator analysis validates parity between SHOW commands and native RPCs - [ ] Full unit test suite passes - [ ] Integration tests pass with UseQueryForMetadata=1 (default) This pull request was AI-assisted by Isaac. --------- Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
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
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.
Summary
Change the default value of
UseQueryForMetadatafrom0to1, making SQL SHOW commands the default for Thrift-mode metadata operations instead of native Thrift RPCs. This aligns Thrift metadata behavior with SEA mode for seamless server-side protocol switching.Breaking Change
This is a breaking change for users who depend on Thrift-native metadata behavior. Key differences:
getFunctionsnow works (was broken via native Thrift RPC)To revert: set
UseQueryForMetadata=0in the connection string.Readiness
Test plan
This pull request was AI-assisted by Isaac.