Go Snowflake Driver release notes for 2026

This article contains the release notes for the Go Snowflake Driver, including the following when applicable:

  • Behavior changes
  • New features
  • Customer-facing bug fixes

Snowflake uses semantic versioning for Go Snowflake Driver updates.

See Go Snowflake Driver for documentation.

Version 2.0.2 (Apr 28, 2026)

新功能和更新

  • Added the QueryResultFormatProvider interface, which exposes the server-reported query result format (Arrow or JSON) from QueryArrowStream. This interface enables callers to distinguish Arrow IPC from JSON responses before interpreting batch streams.

错误修复

  • Fixed an issue where the Account field was empty when connecting with programmatic Config and database/sql.Connector. The driver now derives Account from the first DNS label of Host when it matches the Snowflake hostname pattern.
  • Fixed the PAT (Programmatic Access Token) authenticator to properly require the Token or TokenFilePath field. Previously, the authenticator would silently accept the Password field but never forward it to the authentication service.
  • Fixed the logger reporting incorrect source locations when called without WithContext.
  • Fixed GCP workload identity federation (WIF) attestation to use hostname metadata.google.internal instead of the IPv4 link-local address, enabling support for IPv6-only GCP VMs.
  • Fixed query failures on large inline results (such as 64 MB LOBs) caused by truncated HTTP response bodies. The driver now retries the query when json.Decoder returns io.ErrUnexpectedEOF, reusing the same request ID to retrieve the cached result from Snowflake.

版本 2.0.1(2026 年 4 月 8 日)

错误修复

  • Reduced the default CrlDownloadMaxSize setting from 200 MB to 20 MB to prevent potential out-of-memory errors.
  • 修复了同一连接池中参数值可能因连接不同而变化的问题。
  • 修复了 Azure 多部分文件上传时未能正确填充 blob 的 content-MD5 属性的问题。
  • 修复了对版本化存储暂存区执行 Google Cloud Storage PUT 查询时返回 403 错误的问题。
  • 修复了查询上下文缓存未针对失败的查询进行更新的问题,这可能会导致会话数据过时。
  • 通过优化参数同步,提高了连接处理性能。

内部变更

  • 将配置移至专用内部包。

  • 对代码库中的 Go 语法习惯用法进行了现代化改进。

  • 在客户端环境遥测中添加了 libc 系列、版本以及动态链接标记。

  • 更新了依赖项以解决安全漏洞:

    • golang.org/x/crypto from v0.41.0 to v0.46.0
    • golang.org/x/net from v0.43.0 to v0.48.0
    • golang.org/x/oauth2 from v0.30.0 to v0.34.0
    • golang.org/x/sys from v0.35.0 to v0.40.0
    • golang.org/x/mod from v0.27.0 to v0.30.0
    • golang.org/x/sync from v0.16.0 to v0.19.0
    • golang.org/x/term from v0.34.0 to v0.38.0
    • golang.org/x/text from v0.28.0 to v0.32.0
    • golang.org/x/tools from v0.36.0 to v0.39.0
    • google.golang.org/grpc from v1.73.0 to v1.79.3
    • google.golang.org/protobuf from v1.36.6 to v1.36.10
    • OpenTelemetry 包从 v1.37.0 升级到 v1.40.0
  • Removed pointer indirection from query context cache in snowflakeConn.

版本 1.9.1(2026 年 4 月 8 日)

新功能和更新

  • 添加了对 Go 1.26 的支持,并删除了对 Go 1.23 的支持。

错误修复

  • Fixed minicore crashes (SIGFPE) on fully statically linked Linux binaries by detecting static linking via ELF PT_INTERP inspection and skipping dlopen gracefully.

内部变更

  • 在客户端环境遥测中添加了 libc 系列、版本以及动态链接标记。

版本 2.0.0(2026 年 3 月 3 日)

BCR (行为变更版本)变更

  • Removed RaisePutGetError from SnowflakeFileTransferOptions to ensure errors are raised for PUT/GET operations.

  • Removed GetFileToStream from SnowflakeFileTransferOptions. Use WithFileGetStream to automatically enable file streaming for GET operations.

  • Removed WithOriginalTimestamp. Use WithArrowBatchesTimestampOption(UseOriginalTimestamp) instead.

  • Removed the ClientIP field from the Config struct. This field was never used and is not needed for any functionality.

  • Removed the InsecureMode field from Config struct. Use DisableOCSPChecks instead.

  • Removed the DisableTelemetry field from the Config struct. Use the CLIENT_TELEMETRY_ENABLED session parameter instead.

  • 移除了流分块下载器。请改用默认下载器。

  • Removed SnowflakeTransport. Use Config.Transporter, or simply register your own TLS configuration with RegisterTLSConfig if you just need a custom root certificates set.

  • Renamed WithFileStream to WithFilePutStream for consistency.

  • Renamed the KeepSessionAlive field in the Config struct to ServerSessionKeepAlive for consistency with other drivers.

  • The Array function now returns an error for unsupported types.

  • WithMultiStatement no longer returns an error.

  • Combined WithMapValuesNullable and WithArrayValuesNullable into the single WithEmbeddedValuesNullable option.

  • 隐藏了流分块下载器。它将在未来的版本中被完全移除。

  • The maximum number of chunk download goroutines is now configured with the CLIENT_PREFETCH_THREADS session parameter.

  • Fixed a typo in the GOSNOWFLAKE_SKIP_REGISTRATION environment variable.

  • Unexported MfaToken and IdToken.

  • Arrow 批次变更:

    • Arrow batches have been extracted to a separate package, which should significantly reduce the compilation size for those who don’t need arrow batches (~34MB -> ~18MB).
    • Removed GetArrowBatches from SnowflakeRows and SnowflakeResult. Use arrowbatches.GetArrowBatches(rows.(SnowflakeRows)) instead.
    • 迁移了以下函数:
      • sf.WithArrowBatchesTimestampOption to arrowbatches.WithTimestampOption
      • sf.WithArrowBatchesUtf8Validation to arrowbatches.WithUtf8Validation
      • sf.ArrowSnowflakeTimestampToTime to arrowbatches.ArrowSnowflakeTimestampToTime
  • 日志记录变更:

    • 移除了 Logrus 日志记录器并迁移到 slog。
    • Simplified the SFLogger interface.
    • Added the SFSlogLogger interface for setting a custom slog handler.

新功能和更新

  • 添加了对 Go 1.26 的支持,并删除了对 Go 1.23 的支持。
  • 增加了对仅限 FIPS 模式的支持。

错误修复

  • 为暂存区文件上传和下载操作增加了紧急恢复块。
  • 修复了来自 Azure 容器的 WIF 元数据请求表现为 HTTP 400 错误的问题。
  • Fixed a SAML authentication port validation bypass in isPrefixEqual where the second URL’s port was never checked.
  • 修复了 OCSP 缓存清理器中的竞态条件。
  • The context.Context query is now propagated to cloud storage operations for PUT and GET queries, allowing for better cancellation handling.
  • Fixed minicore crashes (SIGFPE) on fully statically linked Linux binaries by detecting static linking via ELF PT_INTERP inspection and skipping dlopen gracefully.

版本 1.19.0(2026 年 2 月 3 日)

新功能和更新

  • Exposed tokenFilePath in the Config struct, in addition to the existing DSN option.
  • tokenFilePath is now read for every new connection, not only once at driver startup.
  • 添加了在使用工作负载身份联合时对身份模拟的支持。
  • Added the ability to disable minicore from loading at compile time using the -tags minicore_disabled parameter.

错误修复

  • 修复了从未加密暂存区获取文件的问题。
  • 修复了客户端环境中的 minicore 文件名收集问题。
  • 修复了当文件或目录包含空格时来自 GCS 的 403 响应中 GCS URLs 的路径转义问题。
  • 修复了将文件上传到暂存区时(尤其是在 GCS 中)泄露的文件描述符。