Repository navigation
Releases
Releases · databricks/databricks-sql-go
v2.0.0
Breaking changes
- The module path is now
github.com/databricks/databricks-sql-go/v2. Add/v2to driver and subpackage imports. - Upgrade Apache Arrow Go from v12 to v18.8.0 (
github.com/apache/arrow-go/v18). The publicrows.ArrowBatchIteratornow uses v18arrow.RecordBatchand*arrow.Schema; update Arrow imports and code that uses batches.
Driver changes
- Fix HTTP connection leaks after failed requests or exhausted retries. Remove the MPL-2.0
go-retryablehttpandgo-cleanhttpdependencies (#177). - Cap OAuth M2M token requests at 60 seconds and retry failures according to
WithRetries, preventing indefinite hangs (#475). - Top-level GEOMETRY and GEOGRAPHY type names now include SRIDs, such as
GEOMETRY(0),GEOGRAPHY(4326)orGEOMETRY(ANY), in both string mode andWithEnableGeoSpatialSupport(true)mode. Match the family before(when choosing a decoder. Values and scan types are unchanged; Thrift still reportsSTRINGwithout a readable Arrow schema (#474). - Render non-finite FLOAT / DOUBLE values and MAP keys inside ARRAY / MAP / STRUCT results as JSON strings
"NaN","Infinity"and"-Infinity"on both backends. This fixes Thrift row-iteration errors and changes kernel MAP keys from"+Inf"/"-Inf". SQL NULL remainsnull; top-level floats remain numeric (#573). - Report declared DECIMAL precision and scale through
sql.ColumnType.DecimalSize()on both backends, including empty results (#500). - Return Arrow TIME values as UTC
time.Timeon0001-01-01, preserving precision and using clock-only nested JSON. Both backends now reportTIME/time.Timewith no length, including empty and NULL-only results, replacing Thrift'sSTRING/stringand SEA's empty type name/*interface{}(#505). - Top-level VARIANT columns now report
VARIANTinstead ofSTRINGfromsql.ColumnType.DatabaseTypeName(). Values remain JSON text with scan typestringand unchanged length. Thrift still reportsSTRINGwithout a server-supplied Arrow schema (#576). - Explicit
WithMaxDownloadThreads/maxDownloadThreadssettings now also control kernel buffering, affecting memory use and throughput. Unset defaults remain 10 for Thrift and 16 for the kernel; explicit kernel chunk settings take precedence. Zero or negative values warn and use 10, fixing CloudFetch EOF errors (#439). - Retry Thrift
ExecuteStatementaccording toWithRetriesonly when a connection to the server or proxy cannot be opened, before the statement is sent. Failures after connecting are still not retried. With default settings, a refused connection now fails after about 15 seconds (#423). - After
Close, rawdriver.Conncalls toPrepare,PrepareContext,ExecContextandQueryContextnow immediately returndriver.ErrBadConn("connection is closed").database/sqlusers are unaffected (#521). - Reject DSN
timeoutvalues outside ±9223372036 seconds instead of silently overflowingtime.Duration. Negative values within range remain valid (#490). - Avoid redundant Thrift result fetches when direct results specify
hasMoreRows=false(#539). - Add
statement_type=SQLand the result delivery format (INLINE_ARROW,EXTERNAL_LINKSorCOLUMNAR_INLINE, when known) to Thrift statement telemetry (#454). - Fix the module-root package conflict when building, linting or running Gazelle with the
toolsbuild tag (#162).
SQL kernel v1.5.0
Upgrade the kernel bindings to v1.5.0 with these changes for the kernel backend:
- Fix CloudFetch prefetching across result pages, share in-flight page requests, honor cancellation and return cached final chunks before EOF.
- Fetch all inline result pages with
WithCloudFetch(false)/useCloudFetch=false. This option overrides conflicting session settings and survives automatic backend recovery. Servers without paged inline support return a configuration error instead of downloading from cloud storage. - Release transport, HTTP client and runtime resources on session close, including resources retained by OAuth providers.
- Authenticate once before resolving feature flags; fail session open immediately if OAuth token retrieval fails.
- Fail TLS certificate verification errors after one attempt and report the underlying cause, including CloudFetch downloads.
- Omit signed URL query strings and signatures from CloudFetch errors and debug logs.
- Avoid redundant telemetry flush tasks during event bursts.
- Update Rust Arrow to 59.3.2 and QUIC dependencies for security fixes.
v1.19.0
- Upgrade the SQL kernel bindings to v1.4.0.
- Upgrade go-oidc to v3.21.0 (go-jose v4.1.6) and x/oauth2 to v0.36.0 to address go-jose/v3 security findings (#526).
- Reduce kernel-backend JSON rendering allocations for nested Boolean and signed-integer values.
- Render most nested ARRAY / MAP / STRUCT scalars (numbers, booleans, and strings that need no escaping) without
encoding/jsonon both backends, avoiding the per-value overhead of Go 1.27's json/v2-backedencoding/json(#527). - Behavior change: Native Arrow TIMESTAMP_NTZ results now preserve their wall-clock fields and report
TIMESTAMP_NTZon both backends. Returnedtime.Timevalues use UTC instead of the session location; their represented instant and.UTC()value are unchanged (#506). On Thrift, this requires a server-supplied Arrow schema with native timestamps; without it, NTZ still reportsTIMESTAMPand uses session-location handling. String timestamps (UseArrowNativeTimestamp=false, internal) and non-Arrow values also retain legacy parsing.
v1.18.0
- Upgrade the SQL kernel bindings to v1.3.0 to address security findings.
- Require Go 1.27.3 or newer to include the emSign certificate distrust fix (CVE-2026-111943).
- Upgrade klauspost/compress to v1.18.7 to address security findings.
v1.17.0
- Upgrade the SQL kernel bindings to v1.2.0.
- Add opt-in GEOMETRY / GEOGRAPHY support on the kernel backend with
WithEnableGeoSpatialSupportorenableGeoSpatialSupport=true. Enabled mode returns EWKB bytes with per-row SRIDs and geo column metadata; the default remains WKT / EWKT strings. Arrow batches retain the{srid,wkb}struct in enabled mode. - Behavior change:
m2m.NewAuthenticatorWithScopesnow requests exactly the supplied scopes, and the kernel backend supports custom M2M scopes. Empty scopes still default toall-apis; callers that relied on it being appended must include it explicitly. - Share feature flag caching across backends, honor the server TTL, and keep concurrent readers responsive during refresh.
- Let the server feature flag control kernel telemetry when
enableTelemetryis unset; explicit settings continue to override it.
v1.16.0
- Upgrade the kernel bindings to v1.1.0; the kernel dependency is now stable.
- Expand the kernel backend with client query timeouts, configurable idle HTTP connections, and per-statement query tags.
- Transparently recover Reyden/Real-Time warehouse connections from Thrift to the kernel backend.
- Parse explicit HTTP(S) server schemes case-insensitively.
- Upgrade Apache Thrift to v0.24.0 for dependency security findings.
v1.15.1
v1.15.0
- New experimental SEA/kernel backend (opt-in). Set
WithUseKernel(true)(oruseKernel=truein the DSN) to route execution through the Statement Execution API instead of Thrift, backed by the Rustdatabricks-sql-kernelover cgo. It requires a build with-tags databricks_kernelandCGO_ENABLED=1; the default Thrift build is unchanged and returns a clear error if the kernel backend is selected without the tag. The prebuilt kernel binaries ship as per-platform Go modules, sogo getpulls the one for your platform automatically — no Rust toolchain or build step — across 7 platforms (linux amd64/arm64/arm, darwin amd64/arm64, windows amd64/arm64). Kernel-backend features in this release: mTLS client certificates (WithKernelClientCertificate), identity federation (WithFederatedTokenProvider*), U2M on-disk token cache (WithTokenCache), configurable request timeout, opt-in lossy float64 decimals (WithKernelDecimalAsFloat),GetArrowBatcheson the publicRowsinterface, kernel logs routed through the driver logger, cause-categorized telemetry errors, and an Azure U2M OAuth fix (#393, #399, #412, #440). - Bump
golang.org/x/modto v0.40.0 to clear CVE-2026-56864 / CVE-2026-56865 (#460)
v1.14.0
- Minimum Go version is now 1.25.0 (previously 1.20): the
godirective was raised to 1.25.0 while clearing OSV-Scanner findings and updating dependencies. Consumers building with an older toolchain will need to upgrade Go (#368) - Fix panic in
InitThriftClientwhen the endpoint URL is malformed: the thrift transport was type-asserted to*thrift.THttpClientbefore the error fromNewTHttpClientWithOptionswas checked, so a URL that fails to parse (nil transport) causedinterface conversion: thrift.TTransport is nil, not *thrift.THttpClient; the error is now returned instead (#394) - Stop using
html/templatein the U2M OAuth callback page. Reachable use ofhtml/templatedisabled the Go linker's dead-code elimination for the entire binary of any application importing this driver; the page is now rendered with plain string building and explicit HTML escaping, restoring full DCE (#343) - Fix DECIMAL precision loss inside complex types: DECIMAL values nested in STRUCT, ARRAY, and MAP columns are now rendered losslessly with their exact scale (e.g.
19.99instead of19.990000000000002), matching the behavior of top-level DECIMAL columns (#253)
v1.13.1
- Expose native Arrow decimal handling: add the
WithArrowNativeDecimalconnector option and theuseArrowNativeDecimalDSN parameter so DECIMAL columns can be returned as native Arrowdecimal128(viaGetArrowBatches) instead of strings. When scanned throughdatabase/sql, native DECIMAL values are returned as lossless, scale-applied strings (#274)
v1.13.0
- Add SPOG (unified) host support: extract the org-id from the cluster HTTP path for non-Thrift requests, and fix U2M/M2M OAuth on unified AWS hosts (#367, #374)
- Cap CloudFetch Arrow batches to the server-declared row count to avoid over-reading (#372)
- Detach result streaming from
QueryContextcancellation so in-flight results aren't dropped when the query context is cancelled (#373)