Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Added `EnableThriftNativeMetadata` to request and consume supported Thrift-native SEA metadata results.

### Updated
- `UseBoundedSeaApi` and `EnableThriftNativeMetadata` now default to `1`; when unset, activation is controlled by the server-side `enableSqlExecForJdbc` rollout flag.

@rahuls-db rahuls-db Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is public facing release note. Do we need to talk about enableSqlExecForJdbc or should we remove it or leave it as - UseBoundedSeaApi and EnableThriftNativeMetadata now default to 1.

Also, EnableThriftNativeMetadata is a new param introduced for the first time in this release.

@gopalldb any guidance?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we usually include what the new parameter does and how to opt out if if user prefers to not have this change.

- `DatabaseMetaData.getColumns(...)` with a `null` catalog now issues a single `SHOW COLUMNS IN ALL CATALOGS` statement (consistent with `getSchemas`/`getTables`) instead of enumerating every catalog and issuing a per-catalog `SHOW COLUMNS`. Older DBR versions that do not support the syntax transparently fall back to the previous enumerate-and-fan-out behavior.
- Updated bundled Jackson, lz4-java, Netty, and Apache HttpComponents Client and Core dependencies to patched versions to address security findings.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,8 @@ public boolean isSeaSyncMetadataEnabled() {

@Override
public boolean isThriftNativeMetadataEnabled() {
return getParameter(DatabricksJdbcUrlParams.ENABLE_THRIFT_NATIVE_METADATA).equals("1");
return resolveFeatureFlag(
DatabricksJdbcUrlParams.ENABLE_THRIFT_NATIVE_METADATA, SQL_EXEC_FLAG_NAME);
}

@Override
Expand Down Expand Up @@ -1549,7 +1550,7 @@ public boolean isCloudFetchEnabled() {

@Override
public boolean isBoundedSeaApiEnabled() {
return getParameter(DatabricksJdbcUrlParams.USE_BOUNDED_SEA_API).equals("1");
return resolveFeatureFlag(DatabricksJdbcUrlParams.USE_BOUNDED_SEA_API, SQL_EXEC_FLAG_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ public enum DatabricksJdbcUrlParams {
USE_BOUNDED_SEA_API(
"UseBoundedSeaApi",
"Use bounded SEA API for CloudFetch: send row_offset on GetResultData, force StreamingChunkProvider, stop relying on total_chunk_count. Requires server support.",
"0"),
"1"),
ENABLE_THRIFT_NATIVE_METADATA(
"EnableThriftNativeMetadata",
"Request Thrift-native SEA results for catalogs, schemas, tables, columns, functions, primary keys, imported keys, and cross references",
"0"),
"1"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this is set to 1 by default, won't this make server side flag redundant?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@rahuls-db The logic of resolveFeatureFlag is as follow:

  1. If caller explicitly pass this connection param in, use it.
  2. Otherwise, if the default value is 1, use feature flag value
  3. Else, return false

DISABLE_OAUTH_REFRESH_TOKEN(
"DisableOauthRefreshToken",
"Disable requesting OAuth refresh tokens (omit offline_access unless explicitly provided)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
import com.databricks.jdbc.exception.DatabricksVendorCode;
import com.databricks.sdk.core.ProxyConfig;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Stream;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -39,13 +41,26 @@ class DatabricksConnectionContextTest {

private static final Properties properties = new Properties();
private static final Properties properties_with_pwd = new Properties();
private final List<IDatabricksConnectionContext> featureFlagContextsToCleanUp = new ArrayList<>();

@BeforeAll
public static void setUp() {
properties.setProperty("password", "passwd");
properties_with_pwd.setProperty("pwd", "passwd2");
}

@AfterEach
public void cleanUpFeatureFlagContexts() {
featureFlagContextsToCleanUp.forEach(
DatabricksDriverFeatureFlagsContextFactory::removeInstance);
}

private void setFeatureFlagsContext(
IDatabricksConnectionContext context, Map<String, String> flags) {
featureFlagContextsToCleanUp.add(context);
DatabricksDriverFeatureFlagsContextFactory.setFeatureFlagsContext(context, flags);
}

@Test
public void testBuildPropertiesMap() {
String connectionParamString = "param1=value1;param2=value2";
Expand Down Expand Up @@ -1677,6 +1692,82 @@ public void testUseQueryForMetadata_clientExplicit0_overridesServerFlagEnabled()
assertFalse(ctx.useQueryForMetadata());
}

@Test
public void testNativeMetadataViaSea_serverFlagEnabled_warehouseReturnsTrue()
throws DatabricksSQLException {
DatabricksConnectionContext ctx =
(DatabricksConnectionContext)
DatabricksConnectionContext.parse(TestConstants.VALID_URL_1, properties);

Map<String, String> flags = new HashMap<>();
flags.put("databricks.partnerplatform.clientConfigsFeatureFlags.enableSqlExecForJdbc", "true");
setFeatureFlagsContext(ctx, flags);

assertEquals("1", DatabricksJdbcUrlParams.USE_BOUNDED_SEA_API.getDefaultValue());
assertEquals("1", DatabricksJdbcUrlParams.ENABLE_THRIFT_NATIVE_METADATA.getDefaultValue());
assertTrue(ctx.isBoundedSeaApiEnabled());
assertTrue(ctx.isThriftNativeMetadataEnabled());
}

@Test
public void testNativeMetadataViaSea_serverFlagDisabled_warehouseReturnsFalse()
throws DatabricksSQLException {
DatabricksConnectionContext ctx =
(DatabricksConnectionContext)
DatabricksConnectionContext.parse(TestConstants.VALID_URL_1, properties);

Map<String, String> flags = new HashMap<>();
flags.put("databricks.partnerplatform.clientConfigsFeatureFlags.enableSqlExecForJdbc", "false");
setFeatureFlagsContext(ctx, flags);

assertFalse(ctx.isBoundedSeaApiEnabled());
assertFalse(ctx.isThriftNativeMetadataEnabled());
}

@Test
public void testNativeMetadataViaSea_serverFlagEnabled_clusterIgnored()
throws DatabricksSQLException {
DatabricksConnectionContext ctx =
(DatabricksConnectionContext)
DatabricksConnectionContext.parse(TestConstants.VALID_CLUSTER_URL, properties);

Map<String, String> flags = new HashMap<>();
flags.put("databricks.partnerplatform.clientConfigsFeatureFlags.enableSqlExecForJdbc", "true");
setFeatureFlagsContext(ctx, flags);

assertFalse(ctx.isBoundedSeaApiEnabled());
assertFalse(ctx.isThriftNativeMetadataEnabled());
}

@Test
public void testNativeMetadataViaSea_explicitParamsOverrideServerFlag()
throws DatabricksSQLException {
DatabricksConnectionContext enabledCtx =
(DatabricksConnectionContext)
DatabricksConnectionContext.parse(
TestConstants.VALID_URL_1 + ";UseBoundedSeaApi=1;EnableThriftNativeMetadata=1",
properties);
DatabricksConnectionContext disabledCtx =
(DatabricksConnectionContext)
DatabricksConnectionContext.parse(
TestConstants.VALID_URL_1 + ";UseBoundedSeaApi=0;EnableThriftNativeMetadata=0",
properties);

Map<String, String> disabledFlag = new HashMap<>();
disabledFlag.put(
"databricks.partnerplatform.clientConfigsFeatureFlags.enableSqlExecForJdbc", "false");
setFeatureFlagsContext(enabledCtx, disabledFlag);
Map<String, String> enabledFlag = new HashMap<>();
enabledFlag.put(
"databricks.partnerplatform.clientConfigsFeatureFlags.enableSqlExecForJdbc", "true");
setFeatureFlagsContext(disabledCtx, enabledFlag);

assertTrue(enabledCtx.isBoundedSeaApiEnabled());
assertTrue(enabledCtx.isThriftNativeMetadataEnabled());
assertFalse(disabledCtx.isBoundedSeaApiEnabled());
assertFalse(disabledCtx.isThriftNativeMetadataEnabled());
}

// ---------------------------------------------------------------------------
// Geospatial flag independence from complex datatype flag
// ---------------------------------------------------------------------------
Expand Down
Loading