Skip to content

v2.0.0

Latest

Choose a tag to compare

@peco-release-bot peco-release-bot released this 23 Nov 22:15
· 83 commits to main since this release
73b9a3a

Breaking changes

  • The module path is now github.com/databricks/databricks-sql-go/v2. Add /v2 to driver and subpackage imports.
  • Upgrade Apache Arrow Go from v12 to v18.8.0 (github.com/apache/arrow-go/v18). The public rows.ArrowBatchIterator now uses v18 arrow.RecordBatch and *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-retryablehttp and go-cleanhttp dependencies (#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) or GEOMETRY(ANY), in both string mode and WithEnableGeoSpatialSupport(true) mode. Match the family before ( when choosing a decoder. Values and scan types are unchanged; Thrift still reports STRING without 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 remains null; 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.Time on 0001-01-01, preserving precision and using clock-only nested JSON. Both backends now report TIME/time.Time with no length, including empty and NULL-only results, replacing Thrift's STRING/string and SEA's empty type name/*interface{} (#505).
  • Top-level VARIANT columns now report VARIANT instead of STRING from sql.ColumnType.DatabaseTypeName(). Values remain JSON text with scan type string and unchanged length. Thrift still reports STRING without a server-supplied Arrow schema (#576).
  • Explicit WithMaxDownloadThreads / maxDownloadThreads settings 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 ExecuteStatement according to WithRetries only 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, raw driver.Conn calls to Prepare, PrepareContext, ExecContext and QueryContext now immediately return driver.ErrBadConn ("connection is closed"). database/sql users are unaffected (#521).
  • Reject DSN timeout values outside ±9223372036 seconds instead of silently overflowing time.Duration. Negative values within range remain valid (#490).
  • Avoid redundant Thrift result fetches when direct results specify hasMoreRows=false (#539).
  • Add statement_type=SQL and the result delivery format (INLINE_ARROW, EXTERNAL_LINKS or COLUMNAR_INLINE, when known) to Thrift statement telemetry (#454).
  • Fix the module-root package conflict when building, linting or running Gazelle with the tools build 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.