Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ec8a6e8
[PECOBLR-1168] query tags telemetry (#1166)
sreekanth-db Jan 9, 2026
21e07bd
Add UserAgent for connector service calls (#1175)
gopalldb Jan 12, 2026
6f15fd1
Flip IgnoreTransactions default from 0 to 1 for multi-statement trans…
vikrantpuppala Jan 12, 2026
0e8b1ad
Bump version to 3.1.1 (#1172)
jprakash-db Jan 13, 2026
3e4f21c
Fix Arrow field metadata not available for queries with 0 rows (#1177)
gopalldb Jan 16, 2026
4310e77
Implement lazy loading for inline Arrow results (#1029)
jayantsing-db Jan 19, 2026
87b5527
Normalize TIMESTAMP_NTZ to TIMESTAMP in Thrift path for metadata cons…
gopalldb Jan 19, 2026
9c9ffe2
feat: Add support for disabling CloudFetch via EnableQueryResultDownl…
vikrantpuppala Jan 19, 2026
8a2f333
[PECOBLR-1408] [PECOBLR-1407] [PECOBLR-1409][PECOBLR-1411] Address te…
samikshya-db Jan 20, 2026
809c0b3
[PECOBLR-1377] SRID in geospatial column type name (#1157)
sreekanth-db Jan 21, 2026
1a68271
feat: Implement streaming prefetch for Thrift inline results (#1184)
vikrantpuppala Jan 22, 2026
1893a40
Fix IndexOutOfBoundsException in Arrow Metadata Access for DDL Statem…
sreekanth-db Jan 23, 2026
db0e4b9
Fix enable multiple catalog support to match existing driver behaviou…
msrathore-db Jan 24, 2026
0b7f644
allow metric view table type in sea mode (#1188)
shivam2680 Jan 27, 2026
8aed472
Add NonRowcountQueryPrefixes configuration parameter (#1189)
gopalldb Jan 30, 2026
b5c5067
Added support for getClientInfoProperties and getTypeInfo to return a…
msrathore-db Feb 3, 2026
bcb2792
Improved telemetry + error logging for token federation errors (#1179)
samikshya-db Feb 3, 2026
f6691ce
branch freeze for upcoming version release (#1196)
samikshya-db Feb 3, 2026
a8e339e
Add more error logs in http response validation (#1197)
samikshya-db Feb 3, 2026
b9f4dc1
[ES-1717770] Fix timeout exception during fetch results (#1199)
samikshya-db Feb 5, 2026
5fbc44f
Fix rollback to throw when auto-commit is enabled and handle numeric …
vikrantpuppala Feb 11, 2026
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If available, share redacted client side logs
- OS: [e.g. Windows]
- Java version [e.g. Java 21]
- Java vendor [e.g. OpenJDK]
- Driver Version [e.g. 3.0.7]
- Driver Version [e.g. 3.1.1]
- BI Tool (if used) [e.g. DBeaver]
- BI Tool version (if applicable) [e.g. 24.3.5]

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Version Changelog
## [v3.1.1] - 2026-01-07

### Added
- Added token caching for all authentication providers to reduce token endpoint calls.
- We will be rolling out the use of Databricks SQL Execution API by default for queries submitted on DBSQL. To continue using Databricks Thrift Server backend for execution, set `UseThriftClient` to `1`.

### Updated
- Changed default value of `IgnoreTransactions` from `0` to `1` to disable multi-statement transactions by default. Preview participants can opt-in by setting `IgnoreTransactions=0`. Also updated `supportsTransactions()` to respect this flag.

### Fixed
- [PECOBLR-1131] Fix incorrect refetching of expired CloudFetch links when using Thrift protocol.
- Fixed logging to respect params when the driver is shaded.
- Fixed `isWildcard` to return true only when the value is `*`

## [v3.0.7] - 2025-12-18

### Updated
Expand Down
22 changes: 17 additions & 5 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@
## [Unreleased]

### Added
- Added token caching for all authentication providers to reduce token endpoint calls.
- Added streaming prefetch mode for Thrift inline results (columnar and Arrow) with background batch prefetching and configurable sliding window for improved throughput.
- Added `EnableInlineStreaming` connection parameter to enable/disable streaming mode (default: enabled).
- Added `ThriftMaxBatchesInMemory` connection parameter to control the sliding window size for streaming (default: 3).
- Added support for disabling CloudFetch via `EnableQueryResultDownload=0` to use inline Arrow results instead.
- Added `EnableMetricViewSupport` connection parameter to enable/disable Metric View table type (default: disabled).
- Added `NonRowcountQueryPrefixes` connection parameter to specify comma-separated query prefixes that should return result sets instead of row counts.

### Updated
- Enhanced error logging for token exchange failures.
- Geospatial column type names now include SRID information (e.g., `GEOMETRY(4326)` instead of `GEOMETRY`).
- Changed default value of `IgnoreTransactions` from `0` to `1` to disable multi-statement transactions by default. Preview participants can opt-in by setting `IgnoreTransactions=0`. Also updated `supportsTransactions()` to respect this flag.
- Implemented lazy loading for inline Arrow results, fetching arrow batches on demand instead of all at once. This improves memory usage and initial response time for large result sets when using the Thrift protocol with Arrow format.
- **Enhanced `enableMultipleCatalogSupport` behavior**: When this parameter is disabled (`enableMultipleCatalogSupport=0`), metadata operations (such as `getSchemas()`, `getTables()`, `getColumns()`, etc.) now return results only when the catalog parameter is either `null` or matches the current catalog. For any other catalog name, an empty result set is returned. This ensures metadata queries are restricted to the current catalog context. When enabled (`enableMultipleCatalogSupport=1`), metadata operations continue to work across all accessible catalogs.

### Fixed

- [PECOBLR-1131] Fix incorrect refetching of expired CloudFetch links when using Thrift protocol.
- Fixed logging to respect params when the driver is shaded.
- Fixed `isWildcard` to return true only when the value is `*`
- Fixed timeout exception handling to throw `SQLTimeoutException` instead of `DatabricksHttpException` when queries timeout during result fetching phase. This completes the timeout exception fix to handle both query execution polling and result fetching phases.
- Fixed `getTypeInfo()` and `getClientInfoProperties()` to return fresh ResultSet instances on each call instead of shared static instances. This resolves issues where calling these methods multiple times would fail due to exhausted cursor state (Issue #1178).
- Fixed complex data type metadata support when retrieving 0 rows in Arrow format
- Normalized TIMESTAMP_NTZ to TIMESTAMP in Thrift path for consistency with SEA behavior
- Fixed complex types not being returned as objects in SEA Inline mode when `EnableComplexDatatypeSupport=true`.
- Fixed `StringIndexOutOfBoundsException` when parsing complex data types in Thrift CloudFetch mode. The issue occurred when metadata contained incomplete type information (e.g., "ARRAY" instead of "ARRAY<INT>"). Now retrieves complete type information from Arrow metadata.

---
*Note: When making changes, please add your change under the appropriate section
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Add the following dependency to your `pom.xml`:
<dependency>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
<version>3.0.7</version>
<version>3.1.1</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions development/.release-freeze.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"freeze": false,
"reason": "Release freeze disabled"
"freeze": true,
"reason": "Release version 3.2.1"
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
<!-- This value may be modified by a release script to reflect the current version of the driver. -->
<version>3.0.7</version>
<version>3.1.1</version>
<packaging>jar</packaging>
<name>Databricks JDBC Driver</name>
<description>Databricks JDBC Driver.</description>
Expand Down
15 changes: 15 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The release notes summarize enhancements, new features, known issues, workflow c

Version History ==============================================================

3.1.1 ========================================================================
Released 2026-01-07

Enhancements & New Features

* Added token caching for all authentication providers to reduce token endpoint calls.
* We will be rolling out the use of Databricks SQL Execution API by default for queries submitted on DBSQL. To continue using Databricks Thrift Server backend for execution, set `UseThriftClient` to `1`.
* Changed default value of `IgnoreTransactions` from `0` to `1` to disable multi-statement transactions by default. Preview participants can opt-in by setting `IgnoreTransactions=0`. Also updated `supportsTransactions()` to respect this flag.

Resolved Issues

* [PECOBLR-1131] Fix incorrect refetching of expired CloudFetch links when using Thrift protocol.
* Fixed logging to respect params when the driver is shaded.
* Fixed `isWildcard` to return true only when the value is `*`

3.0.7 ========================================================================
Released 2025-12-18

Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/databricks/client/jdbc/DataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.databricks.jdbc.common.DatabricksJdbcConstants;
import com.databricks.jdbc.common.DatabricksJdbcUrlParams;
import com.databricks.jdbc.exception.DatabricksSQLException;
import com.databricks.jdbc.log.JdbcLogger;
import com.databricks.jdbc.log.JdbcLoggerFactory;
import com.databricks.jdbc.pooling.DatabricksPooledConnection;
Expand Down Expand Up @@ -37,13 +36,13 @@ public DataSource(Driver driver) {
}

@Override
public Connection getConnection() throws DatabricksSQLException {
public Connection getConnection() throws SQLException {
LOGGER.debug("public Connection getConnection()");
return getConnection(this.getUsername(), this.getPassword());
}

@Override
public Connection getConnection(String username, String password) throws DatabricksSQLException {
public Connection getConnection(String username, String password) throws SQLException {
LOGGER.debug("public Connection getConnection(String, String)");
if (username != null) {
setUsername(username);
Expand All @@ -55,14 +54,13 @@ public Connection getConnection(String username, String password) throws Databri
}

@Override
public PooledConnection getPooledConnection() throws DatabricksSQLException {
public PooledConnection getPooledConnection() throws SQLException {
LOGGER.debug("public PooledConnection getPooledConnection()");
return new DatabricksPooledConnection(getConnection());
}

@Override
public PooledConnection getPooledConnection(String user, String password)
throws DatabricksSQLException {
public PooledConnection getPooledConnection(String user, String password) throws SQLException {
LOGGER.debug("public PooledConnection getPooledConnection(String, String)");
return new DatabricksPooledConnection(getConnection(user, password));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/databricks/client/jdbc/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public boolean acceptsURL(String url) {
}

@Override
public Connection connect(String url, Properties info) throws DatabricksSQLException {
public Connection connect(String url, Properties info) throws SQLException {
if (!acceptsURL(url)) {
// Return null connection if URL is not accepted - as per JDBC standard.
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public DatabricksConnection(
}

@Override
public void open() throws DatabricksSQLException {
public void open() throws SQLException {
this.session.open();
}

Expand Down Expand Up @@ -252,13 +252,13 @@ private boolean fetchAutoCommitStateFromServer() throws SQLException {
ResultSet rs = statement.executeQuery("SET AUTOCOMMIT");

if (rs.next()) {
// The result should contain the value = "true" or "false"
// The result may contain "true"/"false" or "1"/"0" depending on the server
String value = rs.getString(1); // Column 1: value

LOGGER.debug(
"Fetched autoCommit state from server: value={}. Updating session cache.", value);

boolean autoCommitState = "true".equalsIgnoreCase(value);
boolean autoCommitState = "true".equalsIgnoreCase(value) || "1".equals(value);

// Update the session cache with the server value
session.setAutoCommit(autoCommitState);
Expand Down Expand Up @@ -382,13 +382,20 @@ public void rollback() throws SQLException {
return;
}

// Rollback is not valid when auto-commit is enabled (no active transaction)
if (getAutoCommit()) {
throw new DatabricksTransactionException(
"Cannot use rollback while Connection is in auto-commit mode.",
new SQLException("Cannot use rollback while Connection is in auto-commit mode."),
DatabricksDriverErrorCode.TRANSACTION_ROLLBACK_ERROR);
}

// Execute ROLLBACK command
Statement statement = null;
try {
statement = createStatement();
statement.execute("ROLLBACK");
// Note: Server auto-starts new transaction if autocommit=false
// Note: ROLLBACK is more forgiving - typically succeeds even on unexpected states

} catch (SQLException e) {
LOGGER.error(e, "Error {} while rolling back transaction", e.getMessage());
Expand All @@ -401,7 +408,7 @@ public void rollback() throws SQLException {
}

@Override
public void close() throws DatabricksSQLException {
public void close() throws SQLException {
LOGGER.debug("public void close()");
for (IDatabricksStatementInternal statement : statementSet) {
statement.close(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public DatabricksClientType getClientTypeFromContext() {
// Check if circuit breaker is open due to recent 429 rate limit failures
if (SeaCircuitBreakerManager.isCircuitOpen()) {
long remainingMs = SeaCircuitBreakerManager.getTimeRemainingMs();
LOGGER.info(
LOGGER.debug(
"SEA circuit breaker is OPEN due to recent 429 rate limit failures. "
+ "Using THRIFT client. Circuit will close in {} ({}ms)",
SeaCircuitBreakerManager.getTimeRemainingFormatted(),
Expand All @@ -469,7 +469,7 @@ public DatabricksClientType getClientTypeFromContext() {
return DatabricksClientType.THRIFT;
}
// Check if CloudFetch is disabled - Thrift is required for inline mode
if (!Objects.equals(getParameter(DatabricksJdbcUrlParams.ENABLE_CLOUD_FETCH), "1")) {
if (!isCloudFetchEnabled()) {
return DatabricksClientType.THRIFT;
}
// Check feature flag to determine if SEA client should be enabled
Expand Down Expand Up @@ -1162,9 +1162,19 @@ public boolean isBatchedInsertsEnabled() {
return getParameter(DatabricksJdbcUrlParams.ENABLE_BATCHED_INSERTS).equals("1");
}

@Override
public List<String> getNonRowcountQueryPrefixes() {
String prefixesStr = getParameter(DatabricksJdbcUrlParams.NON_ROWCOUNT_QUERY_PREFIXES);
return Arrays.stream(prefixesStr.split(","))
.map(String::trim)
.map(String::toUpperCase)
.filter(s -> !s.isEmpty())
.collect(Collectors.toList());
}

@Override
public boolean getIgnoreTransactions() {
return getParameter(DatabricksJdbcUrlParams.IGNORE_TRANSACTIONS, "0").equals("1");
return getParameter(DatabricksJdbcUrlParams.IGNORE_TRANSACTIONS).equals("1");
}

@Override
Expand Down Expand Up @@ -1198,6 +1208,27 @@ public boolean isStreamingChunkProviderEnabled() {
return getParameter(DatabricksJdbcUrlParams.ENABLE_STREAMING_CHUNK_PROVIDER).equals("1");
}

@Override
public boolean isInlineStreamingEnabled() {
return getParameter(DatabricksJdbcUrlParams.ENABLE_INLINE_STREAMING).equals("1");
}

@Override
public boolean isCloudFetchEnabled() {
return getParameter(DatabricksJdbcUrlParams.ENABLE_CLOUD_FETCH).equals("1");
}

@Override
public int getThriftMaxBatchesInMemory() {
try {
return Integer.parseInt(getParameter(DatabricksJdbcUrlParams.THRIFT_MAX_BATCHES_IN_MEMORY));
} catch (NumberFormatException e) {
LOGGER.warn("Invalid value for ThriftMaxBatchesInMemory, using default value");
return Integer.parseInt(
DatabricksJdbcUrlParams.THRIFT_MAX_BATCHES_IN_MEMORY.getDefaultValue());
}
}

@Override
public int getLinkPrefetchWindow() {
return Integer.parseInt(getParameter(DatabricksJdbcUrlParams.LINK_PREFETCH_WINDOW));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static com.databricks.jdbc.common.MetadataResultConstants.*;
import static com.databricks.jdbc.dbclient.impl.common.CommandConstants.METADATA_STATEMENT_ID;
import static com.databricks.jdbc.dbclient.impl.sqlexec.ResultConstants.CLIENT_INFO_PROPERTIES_RESULT;

import com.databricks.jdbc.api.impl.converters.ConverterHelper;
import com.databricks.jdbc.api.internal.IDatabricksConnectionInternal;
Expand Down Expand Up @@ -834,7 +833,7 @@ public int getDefaultTransactionIsolation() throws SQLException {
public boolean supportsTransactions() throws SQLException {
LOGGER.debug("public boolean supportsTransactions()");
throwExceptionIfConnectionIsClosed();
return true;
return !session.getConnectionContext().getIgnoreTransactions();
}

@Override
Expand Down Expand Up @@ -1529,7 +1528,7 @@ public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
public ResultSet getClientInfoProperties() throws SQLException {
LOGGER.debug("public ResultSet getClientInfoProperties()");
throwExceptionIfConnectionIsClosed();
return CLIENT_INFO_PROPERTIES_RESULT;
return metadataResultSetBuilder.getClientInfoPropertiesResult();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public boolean execute() throws SQLException {
checkIfClosed();
checkIfBatchOperation();
interpolateIfRequiredAndExecute(StatementType.SQL);
return shouldReturnResultSet(sql);
return shouldReturnResultSetWithConfig(sql);
}

@Override
Expand Down
Loading
Loading