Add server-side SAFE flag for UseQueryForMetadata rollout on DBSQL#1437
Open
gopalldb wants to merge 7 commits intodatabricks:mainfrom
Open
Add server-side SAFE flag for UseQueryForMetadata rollout on DBSQL#1437gopalldb wants to merge 7 commits intodatabricks:mainfrom
gopalldb wants to merge 7 commits intodatabricks:mainfrom
Conversation
Add support for server-side feature flag enableUseQueryForThriftJdbc to control SHOW commands rollout for Thrift metadata operations on DBSQL warehouses. Priority order: 1. Client-side param (UseQueryForMetadata in JDBC URL) — honoured first 2. Server-side SAFE flag (DBSQL warehouses only) 3. Default value (0 = disabled) Extract resolveFeatureFlag() helper for client-first, server-fallback pattern reusable across similar feature flags. Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
01c5eb5 to
c492b92
Compare
5 tests covering all priority combinations: - Server flag enabled on warehouse → true - Server flag disabled on warehouse → false - Server flag enabled on cluster → ignored (false) - Client explicit=1 overrides server disabled → true - Client explicit=0 overrides server enabled → false Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
vikrantpuppala
approved these changes
May 11, 2026
…warehouses Change resolveFeatureFlag logic to: 1. User explicitly set param → honour it (any compute) 2. No explicit setting + cluster → always false 3. No explicit setting + warehouse → true only when BOTH client default is "1" AND server-side flag is enabled Change UseQueryForMetadata default from "0" to "1" so the server-side flag becomes the sole rollout gate for warehouses. Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
- Update test comments to reflect two-key mechanism (client default + server flag) - Add breaking change entry to NEXT_CHANGELOG.md for UseQueryForMetadata default change Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
Document three breaking changes: 1. getTables() % catalog treated as literal, not wildcard 2. getColumnTypeName() returns base DECIMAL without precision/scale 3. DBSQL metadata operations now use SHOW commands (UseQueryForMetadata) Co-authored-by: Isaac Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
…contamination DatabricksDriverFeatureFlagsContextFactory uses a static ConcurrentHashMap that persists across tests. When DatabricksConnectionContextTest sets enableUseQueryForThriftJdbc=true, it leaks into DatabricksSessionTest, causing useQueryForMetadata() to return true unexpectedly. Fix: call removeInstance() in setupWarehouse() to clear stale flags. Co-authored-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
Adds support for server-side SAFE flag
enableUseQueryForThriftJdbcto control the SHOW commands rollout for Thrift metadata operations on DBSQL warehouses.Priority order (matches UseThriftClient pattern):
UseQueryForMetadatain JDBC URL) — honoured first, unconditionallyenableUseQueryForThriftJdbc) — checked for DBSQL warehouses only0= disabled)Examples:
UseQueryForMetadatain URL10Code changes:
resolveFeatureFlag(clientParam, serverFlagName)helper inDatabricksConnectionContext— reusable for future client-first/server-fallback patternsuseQueryForMetadata()to use the new helperTest plan
DatabricksConnectionContextTest— 110 tests passDatabricksSessionTest— 18 tests passNO_CHANGELOG=true
This pull request was AI-assisted by Isaac.