Skip to content

Commit 7d3b073

Browse files
authored
Merge branch 'main' into fix/issue-1418-dml-union-classification
2 parents 9c5e26f + f3923fa commit 7d3b073

59 files changed

Lines changed: 2417 additions & 286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bugCatcher.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ jobs:
8181
- name: Cache Maven packages
8282
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8383
with:
84-
path: ~/.m2
84+
# Cache only the local repository — caching ~/.m2 itself would
85+
# restore a stale settings.xml on top of the JFrog-configured one
86+
# written above, causing Maven to bypass the mirror and hit Maven
87+
# Central directly.
88+
path: ~/.m2/repository
8589
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
8690
restore-keys: ${{ runner.os }}-m2
8791

.github/workflows/loggingTesting.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
java-version: '21'
4545

4646
- name: Get JFrog OIDC token
47+
shell: bash
4748
run: |
4849
set -euo pipefail
4950
@@ -70,6 +71,7 @@ jobs:
7071
echo "JFrog OIDC token obtained successfully"
7172
7273
- name: Configure maven
74+
shell: bash
7375
run: |
7476
set -euo pipefail
7577

.github/workflows/runIntegrationTests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ jobs:
8585
echo "Maven configured to use JFrog registry"
8686
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8787
with:
88-
path: ~/.m2
88+
# Cache only the local repository — caching ~/.m2 itself would
89+
# restore a stale settings.xml on top of the JFrog-configured one
90+
# written above, causing Maven to bypass the mirror and hit Maven
91+
# Central directly.
92+
path: ~/.m2/repository
8993
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
9094
restore-keys: ${{ runner.os }}-m2
9195
- name: Create .pem file from secret

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Version Changelog
22

3+
## [v3.3.3] - 2026-04-29
4+
5+
### Fixed
6+
- Fixed unresolvable Maven Central POM for the uber JAR. The published POM no longer declares a transitive dependency on the internal `databricks-jdbc-core` coordinate (which is not published to Maven Central), restoring resolution for downstream consumers (#1431).
7+
8+
## [v3.3.2] - 2026-04-27: DEPRECATED, Use v3.3.3 instead
9+
10+
### Added
11+
- Added `CallableStatement` support with IN parameters. `Connection.prepareCall()` now returns a working `DatabricksCallableStatement` that supports positional parameter binding and execution via `{call proc(?)}` JDBC escape syntax. OUT/INOUT parameters and named parameters throw `SQLFeatureNotSupportedException`.
12+
- 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.
13+
14+
### Updated
15+
- Added support for using SQL SHOW commands for Thrift-mode metadata operations (`getTables`, `getColumns`, `getSchemas`, `getFunctions`, `getPrimaryKeys`, `getImportedKeys`, `getCrossReference`). Enable by setting `UseQueryForMetadata=1`. This aligns Thrift metadata behavior with Statement Execution API (SEA) mode.
16+
17+
### Fixed
18+
- Improved error messages for cancelled statements: operations cancelled via `Statement.cancel()` or closed connections now return SQL state `HY008` (operation cancelled) instead of generic error codes, making it easier for applications to detect and handle cancellations.
19+
- Fixed race condition between chunk download error handling and result set close that could cause invalid state transition warnings (`CHUNK_RELEASED -> DOWNLOAD_FAILED`) during Arrow Cloud Fetch operations in resource-constrained environments.
20+
- Fixed `EnableBatchedInserts` silently falling back to individual execution when table or schema names contain special characters (e.g., hyphens) inside backtick-quoted identifiers. Added a warn log when the fallback occurs.
21+
- Fixed `IntervalConverter` crash (`IllegalArgumentException: Invalid interval metadata`) when INTERVAL columns are returned via CloudFetch. Arrow metadata from CloudFetch uses underscored format (`INTERVAL_YEAR_MONTH`, `INTERVAL_DAY_TIME`) which the driver's regex did not accept.
22+
- Fixed `Statement` being prematurely closed after queries that return inline results, which prevented re-execution, `getResultSet()`, and `getExecutionResult()` from working. Statements now remain open and reusable until explicitly closed by the caller.
23+
- Fixed primitive types within complex types (ARRAY, MAP, STRUCT) not being correctly parsed when Arrow serialization uses alternate formats: TIMESTAMP/TIMESTAMP_NTZ as epoch microseconds or component arrays, and BINARY as base64-encoded strings.
24+
- Fixed `PARSE_SYNTAX_ERROR` for column names containing special characters (e.g., dots) when `EnableBatchedInserts` is enabled, by re-quoting column names with backticks in reconstructed multi-row INSERT statements.
25+
- Fixed Volume ingestion for SEA mode, which was broken due to statement being closed prematurely.
26+
- Fixed unclear `error: [null]` messages during transient HTTP failures (e.g. 502 Bad Gateway) in Thrift polling. Error messages now include server error details and use SQL state `08S01` (communication link failure) so callers can identify retryable errors. Also fixed `DatabricksError` (RuntimeException) from SDK client being unhandled in CloudFetch download paths.
27+
- Fixed escaped pattern characters in catalogName for `getSchemas`, as returned catalogName should be unescaped.
28+
- Fixed `getColumnClassName()` returning null for VARIANT columns in SEA mode by adding VARIANT to the type system.
29+
- Fixed `getColumns()` returning `DATA_TYPE=0` (NULL) for GEOMETRY/GEOGRAPHY columns in Thrift mode. Now returns `Types.VARCHAR` (12) when geospatial is disabled and `Types.OTHER` (1111) when enabled, consistent with SEA mode.
30+
- Fixed `getCrossReference()` returning 0 rows when parent args are passed in uppercase. The client-side filter used case-sensitive comparison against server-returned lowercase names.
31+
332
## [v3.3.1] - 2026-03-17
433

534
### Added

NEXT_CHANGELOG.md

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,54 @@
22

33
## [Unreleased]
44

5+
### BREAKING CHANGES in 3.4.1 — Metadata JDBC Spec Compliance
6+
7+
This release unifies metadata behavior across Thrift and SQL Exec API backends
8+
using SQL SHOW commands for all metadata operations on SQL warehouses. Several
9+
non-spec-compliant behaviors have been corrected. Review the changes below before
10+
upgrading. These changes do not affect metadata on All-Purpose Clusters.
11+
12+
* **`getTables`/`getColumns`/`getSchemas`: Catalog parameter is now treated as
13+
an exact-match identifier per JDBC spec.** Passing `%` or wildcard patterns as
14+
catalog previously returned results across all catalogs.
15+
Use `null` to search all catalogs.
16+
17+
* **`getTables` with empty types array: Now returns zero rows per JDBC spec.**
18+
Use `null` to return all types.
19+
20+
* **`getSchemas`: Now includes `information_schema` in results.** Excludes
21+
`global_temp` schema (previously returned by Thrift for all catalogs).
22+
23+
* **`getPrimaryKeys`/`getImportedKeys`/`getCrossReference` with non-existent
24+
catalog, schema, or table: Now returns empty `ResultSet` instead of throwing
25+
`SQLException`.**
26+
27+
* **`getImportedKeys` `UPDATE_RULE`/`DELETE_RULE`: Now returns `3` (`NO_ACTION`)
28+
instead of `0` (`CASCADE`) for Thrift, and `3` instead of `null` for SEA.**
29+
This reflects that Unity Catalog foreign keys are informational and non-enforced.
30+
31+
* **Native geospatial type support (`GEOMETRY` and `GEOGRAPHY`) is now enabled
32+
by default.** `getObject()` now returns `IGeometry`/`IGeography` instances
33+
instead of EWKT strings. Set `EnableGeoSpatialSupport=0` to restore the
34+
previous behavior.
35+
536
### Added
6-
- Added `CallableStatement` support with IN parameters. `Connection.prepareCall()` now returns a working `DatabricksCallableStatement` that supports positional parameter binding and execution via `{call proc(?)}` JDBC escape syntax. OUT/INOUT parameters and named parameters throw `SQLFeatureNotSupportedException`.
7-
- 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.
37+
- Metadata operations now use SQL SHOW commands for both Thrift and SEA backends,
38+
ensuring consistent behavior for SQL warehouses regardless of underlying
39+
protocol. To revert to native Thrift metadata RPCs, set `UseQueryForMetadata=0`.
840

941
### Updated
10-
- **[Breaking Change]** Thrift-mode metadata operations (`getTables`, `getColumns`, `getSchemas`, `getFunctions`, `getPrimaryKeys`, `getImportedKeys`, `getCrossReference`) on **SQL Warehouses** now use SQL SHOW commands by default instead of native Thrift RPCs, aligning behavior with Statement Execution API (SEA) mode. All-Purpose Clusters are unaffected and continue using native Thrift RPCs. The `UseQueryForMetadata` connection property default changed from `0` to `1`. To revert to native Thrift RPCs, set `UseQueryForMetadata=0`. Key behavioral changes:
11-
- Catalog parameter is now treated as a literal identifier (not a wildcard pattern) per JDBC spec. Use `null` to search across all catalogs.
12-
- Methods that previously threw exceptions for null/empty edge-case inputs now return empty result sets.
13-
- `getFunctions` now works correctly (was broken via native Thrift RPC).
14-
- Result columns (TABLE_CATALOG, etc.) return stored values (lowercase) instead of preserving input case.
15-
- Connection properties `EnableShowCommandForGetFunctions` and `TreatMetadataCatalogNameAsPattern` are now redundant when `UseQueryForMetadata=1` (the new default).
42+
- `getColumnTypeName()` for DECIMAL columns now preserves precision/scale suffix (e.g., `"DECIMAL(10,2)"`) consistently across both Thrift and SEA backends.
43+
- `EnableGeoSpatialSupport` no longer requires `EnableComplexDatatypeSupport=1`. Geospatial types (GEOMETRY, GEOGRAPHY) can now be enabled independently of complex type support (ARRAY, MAP, STRUCT).
44+
- Arrow schema deserialization failures (Thrift metadata path) now surface a dedicated driver error code `ARROW_SCHEMA_PARSING_ERROR` (vendor code `22000`) and a proper SQLSTATE `22000` (Data Exception) on the thrown `SQLException`, instead of the generic `RESULT_SET_ERROR` (1004) and the enum name as SQLSTATE. The exception message is unchanged.
45+
- When a Statement is re-executed, the previous server-side operation is now explicitly closed before starting the new execution, preventing orphaned server-side operations when Statements are reused.
46+
- Server-side operations are now closed proactively when `ResultSet.close()` is called, improving resource utilization. The client-side Statement remains open and reusable for re-execution. As a result, `getExecutionResult()` after result consumption returns the cached ResultSet instead of making a server RPC.
1647

1748
### Fixed
18-
- Fixed `EnableBatchedInserts` silently falling back to individual execution when table or schema names contain special characters (e.g., hyphens) inside backtick-quoted identifiers. Added a warn log when the fallback occurs.
19-
- Fixed `IntervalConverter` crash (`IllegalArgumentException: Invalid interval metadata`) when INTERVAL columns are returned via CloudFetch. Arrow metadata from CloudFetch uses underscored format (`INTERVAL_YEAR_MONTH`, `INTERVAL_DAY_TIME`) which the driver's regex did not accept.
20-
- Fixed `Statement` being prematurely closed after queries that return inline results, which prevented re-execution, `getResultSet()`, and `getExecutionResult()` from working. Statements now remain open and reusable until explicitly closed by the caller.
21-
- Fixed primitive types within complex types (ARRAY, MAP, STRUCT) not being correctly parsed when Arrow serialization uses alternate formats: TIMESTAMP/TIMESTAMP_NTZ as epoch microseconds or component arrays, and BINARY as base64-encoded strings.
22-
- Fixed `PARSE_SYNTAX_ERROR` for column names containing special characters (e.g., dots) when `EnableBatchedInserts` is enabled, by re-quoting column names with backticks in reconstructed multi-row INSERT statements.
23-
- Fixed Volume ingestion for SEA mode, which was broken due to statement being closed prematurely.
24-
- Fixed escaped pattern characters in catalogName for `getSchemas`, as returned catalogName should be unescaped.
25-
- Fixed `getColumnClassName()` returning null for VARIANT columns in SEA mode by adding VARIANT to the type system.
26-
- Fixed `getColumns()` returning `DATA_TYPE=0` (NULL) for GEOMETRY/GEOGRAPHY columns in Thrift mode. Now returns `Types.VARCHAR` (12) when geospatial is disabled and `Types.OTHER` (1111) when enabled, consistent with SEA mode.
27-
- Fixed `getCrossReference()` returning 0 rows when parent args are passed in uppercase. The client-side filter used case-sensitive comparison against server-returned lowercase names.
49+
- Fixed `DatabaseMetaData.getTables()` in Thrift mode returning rows when called with an empty `types` array. Per JDBC spec, empty types means "no types selected" and now correctly returns zero rows (matching SEA mode).
50+
- Fixed `?` characters inside SQL comments, string literals, and quoted identifiers being incorrectly counted as parameter placeholders when `supportManyParameters=1`. `SQLInterpolator` now uses `SqlCommentParser` to locate only real placeholders. Fixes #1331.
51+
- Fixed `MetadataOperationTimeout` not being applied when metadata operations use SHOW commands. Operations like `getTables`, `getSchemas`, and `getColumns` now respect the `MetadataOperationTimeout` connection property instead of hanging indefinitely with no timeout.
52+
- Reclassify transient server errors to standard SQL states (08S01, 40001) across all Thrift error sites. This ensures UC unavailability and concurrent modification errors surface consistently for better retry handling. Note: Dashboards and branching logic keyed on legacy XXUCC or 42000 must be updated.
2853

2954
---
3055
*Note: When making changes, please add your change under the appropriate section

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add the following dependency to your `pom.xml`:
2020
<dependency>
2121
<groupId>com.databricks</groupId>
2222
<artifactId>databricks-jdbc</artifactId>
23-
<version>3.3.2-SNAPSHOT</version>
23+
<version>3.3.3</version>
2424
</dependency>
2525
```
2626

assembly-thin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.databricks</groupId>
99
<artifactId>databricks-jdbc-parent</artifactId>
10-
<version>3.3.2-SNAPSHOT</version>
10+
<version>3.3.3</version>
1111
</parent>
1212

1313
<artifactId>databricks-jdbc-thin</artifactId>
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>com.databricks</groupId>
5353
<artifactId>databricks-jdbc-core</artifactId>
54-
<version>3.3.2-SNAPSHOT</version>
54+
<version>3.3.3</version>
5555
</dependency>
5656
</dependencies>
5757

assembly-uber/pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.databricks</groupId>
99
<artifactId>databricks-jdbc-parent</artifactId>
10-
<version>3.3.2-SNAPSHOT</version>
10+
<version>3.3.3</version>
1111
</parent>
1212

1313
<artifactId>databricks-jdbc</artifactId>
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>com.databricks</groupId>
5353
<artifactId>databricks-jdbc-core</artifactId>
54-
<version>3.3.2-SNAPSHOT</version>
54+
<version>3.3.3</version>
5555
</dependency>
5656
</dependencies>
5757

@@ -61,6 +61,13 @@
6161

6262
<build>
6363
<plugins>
64+
<!-- flatten-maven-plugin produces .flattened-pom.xml: a self-contained
65+
POM with the parent reference inlined and all <dependencies> stripped.
66+
The shaded uber jar bundles every runtime dep, so the published POM
67+
must declare zero compile deps; otherwise consumers transitively pull
68+
the internal databricks-jdbc-core coordinate (which is not published
69+
to Maven Central) and resolution fails. The release workflow uploads
70+
.flattened-pom.xml as the published POM. -->
6471
<plugin>
6572
<groupId>org.codehaus.mojo</groupId>
6673
<artifactId>flatten-maven-plugin</artifactId>
@@ -69,7 +76,7 @@
6976
<updatePomFile>true</updatePomFile>
7077
<flattenMode>oss</flattenMode>
7178
<pomElements>
72-
<dependencies>expand</dependencies>
79+
<dependencies>remove</dependencies>
7380
<build>remove</build>
7481
</pomElements>
7582
</configuration>

jdbc-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.databricks</groupId>
88
<artifactId>databricks-jdbc-parent</artifactId>
9-
<version>3.3.2-SNAPSHOT</version>
9+
<version>3.3.3</version>
1010
</parent>
1111

1212
<artifactId>databricks-jdbc-core</artifactId>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>com.databricks</groupId>
66
<artifactId>databricks-jdbc-parent</artifactId>
77
<!-- This value may be modified by a release script to reflect the current version of the driver. -->
8-
<version>3.3.2-SNAPSHOT</version>
8+
<version>3.3.3</version>
99
<packaging>pom</packaging>
1010
<name>Databricks JDBC Parent</name>
1111
<description>Parent POM for Databricks JDBC Driver.</description>
@@ -63,7 +63,7 @@
6363
<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
6464

6565
<!-- Dependency Versions -->
66-
<databricks-jdbc-version>3.3.2-SNAPSHOT</databricks-jdbc-version>
66+
<databricks-jdbc-version>3.3.3</databricks-jdbc-version>
6767
<arrow.version>18.3.0</arrow.version>
6868
<commons-lang3.version>3.18.0</commons-lang3.version>
6969
<commons-configuration.version>2.10.1</commons-configuration.version>

0 commit comments

Comments
 (0)