github ClickHouse/clickhouse-go v2.52.0

one hour ago

Highlights

  • Context deadlines no longer override max_execution_time (#2101): Context deadlines now only limit how long the client waits instead of setting max_execution_time to deadline + 5s. Explicit max_execution_time values from connection/DSN/query settings or server profiles are preserved. Over HTTP, queries can continue running on the server after the context expires unless max_execution_time or cancel_http_readonly_queries_on_client_close is configured.
  • Deprecate WithAsync and WithStdAsync helpers (#2096): WithAsync, WithStdAsync, and AsyncInsert are deprecated in favor of WithSettings with async_insert and wait_for_async_insert.
  • Reject unsupported legacy JSON shared data and Dynamic SharedVariant (#2004): Queries decoding legacy Native JSON overflow/shared data or Dynamic SharedVariant now return an error instead of corrupting stream alignment or returning binary bytes as strings. Set output_format_native_use_flattened_dynamic_and_json_serialization=1 on ClickHouse 25.6+ to read these values.
  • Prevent ReadTimeout failures on slow consumers (#2063): Native queries now reset the read deadline after each data block is handed to the consumer, so time spent blocked in a slow rows.Next() loop no longer triggers i/o timeout.
  • Propagate mid-stream errors in Batch.Append from Rows (#2017): appendRowsBlocks now returns rows.Err(), invalidates the batch, and retires the connection on mid-stream source failures instead of silently succeeding.
  • Fix ConnOpenRandom failover and migrate to math/rand/v2 (#1810): ConnOpenRandom now picks a single random starting offset and walks all hosts once in round-robin order instead of re-rolling per attempt.
  • HTTP read-only user compression & handshake fixes (#2121, #2125): Avoids sending compression settings for readonly = 1 users, preserves caller-configured compression settings, and keeps first-query options off the HTTP server-info handshake (serverTimezone()).
  • Bind typed nil driver.Valuer as NULL & preserve heredocs (#2029): Prevents panics on typed nil driver.Valuer pointers and skips parameter substitution inside $$...$$ / $tag$...$tag$ heredoc literals.

What's Changed

Enhancements

Fixes

Dependencies

  • chore(deps): bump github.com/testcontainers/testcontainers-go from 0.44.0 to 0.45.0 by @dependabot[bot] in #2108
  • chore(deps): bump github.com/andybalholm/brotli from 1.2.7 to 1.2.8 by @dependabot[bot] in #2107
  • chore(deps): bump github.com/andybalholm/brotli from 1.2.8 to 1.3.0 by @dependabot[bot] in #2117
  • chore(deps): bump github.com/moby/moby/api from 1.56.1 to 1.57.0 by @dependabot[bot] in #2133
  • chore(deps): bump github.com/moby/moby/client from 0.6.2 to 0.6.3 by @dependabot[bot] in #2132
  • chore(deps): bump github.com/ClickHouse/ch-go from 0.75.0 to 0.76.0 by @dependabot[bot] in #2147
  • chore(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 by @dependabot[bot] in #2159

Other Changes

New Contributors

Full Changelog: v2.51.0...v2.52.0

Don't miss a new clickhouse-go release

NewReleases is sending notifications on new releases.