Snowpark Library for Scala and Java release notes for 2024

This article contains the release notes for the Snowpark Library for Scala and Snowpark Library for Java, including the following when applicable:

  • 行为变更
  • 新功能
  • 面向客户的错误修复

Snowflake uses semantic versioning for Snowpark Library for Scala and Java updates.

See Snowpark Developer Guide for Java and Snowpark Developer Guide for Scala for documentation.

版本 1.15.0(2024 年 12 月 18 日)

兼容的 Snowflake 版本:8.46

新功能

  • 新函数:

    • months_between
    • instr
    • format_number
    • from_unix_timestamp
    • to_unix_timestamp
    • Row.getAs
  • Support for SQL bind in Session.sql function.

版本 1.14.0(2024 年 9 月 4 日)

兼容的 Snowflake 版本:8.35

新功能

  • 添加了对从 Snowflake 读取结构化类型的支持。
  • 添加了以下新函数:
    • Variant.asJsonNode
    • Functions.round
    • Functions.hex
    • Functions.unhex
    • Functions.shiftleft
    • Functions.shiftright
    • Functions.reverse
    • Functions.isnull
    • Functions.unix_timestamp
    • Functions.locate
    • Functions.ntile
    • Functions.radn
    • Functions.randn
    • Functions.regexp_extract
    • Functions.signum
    • Functions.sign
    • Functions.substring_index
    • Functions.collect_list
    • Functions.log10
    • Functions.log1p
    • Functions.base64
    • Functions.unbase64
    • Functions.expr
    • Functions.array
    • Functions.date_format
    • Functions.last
    • Functions.desc
    • Functions.asc
    • Functions.size

改进

无。

错误修复

  • 修复了 Open Telemetry span 中时间信息不正确的问题
  • 修复了计数操作中重复的 Open Telemetry span

版本 1.13.2(2024 年 8 月 26 日)

兼容的 Snowflake 版本:8.31

新功能

无。

改进

无。

错误修复

  • 修复了 Jackson Scala 模块兼容性问题。

版本 1.13.1(2024 年 8 月 21 日)

兼容的 Snowflake 版本:8.31

新功能

无。

改进

无。

错误修复

  • When the session parameter ERROR_ON_NONDETERMINISTIC_UPDATE is set to true, calls to session.table(...).update(...) no longer report errors.

版本 1.13.0(2024 年 8 月 1 日)

兼容的 Snowflake 版本:8.28

新功能

  • Java/Scala 存储过程中的发出 span。支持以下函数:

    • 所有操作函数
    • 注册 UDF/UDTF/SProc
  • Enable retrieving cloud provider tokens in the SnowflakeSecrets class.

  • 新函数:

    • Session.updateQueryTag
    • functions.countDistinct
    • functions.max(String)
    • functions.min(String)
    • functions.mean(String)

改进

  • 会话查询标记中的应用程序名称现在是 JSON 格式。
  • 将 SLF4J 升级到了 2.0.4。
  • Update documentation for SnowflakeFile

错误修复

  • 变体对象无法处理 null 值
  • DataFrame alias doesn’t work in the JOIN condition

版本 1.12.1(2024 年 5 月 13 日)

兼容的 Snowflake 版本:8.18

新功能

无。

改进

无。

错误修复

修复了“Dataframe alias doesn’t work in the JOIN condition”这一问题。

版本 1.12.0(2024 年 4 月 16 日)

兼容的 Snowflake 版本:8.14

新功能

  • Support the Geometry data type.
  • New function: sum(String).
  • 支持在创建新会话时设置应用程序名称。

改进

Added code examples for the split function in the API document.

错误修复

无。

版本 1.11.0(2024 年 4 月 1 日)

兼容的 Snowflake 版本:8.12

新功能

  • 支持 Java 17 存储过程
    • When registering a stored procedure, Snowpark automatically sets runtime_version to 17 if the client is running with JVM 17.

改进

无。

错误修复

无。

版本 1.10.0(2024 年 2 月 9 日)

兼容的 Snowflake 版本:8.5

新功能

  • 支持 Java 17。

    • 兼容 JVM 17。
    • When registering a UDF or UDTF, Snowpark automatically sets the runtime_version to 17 if the client is running with JVM 17.
  • 支持数据帧别名。

    • You can use the DataFrame.alias function to assign DataFrames an alias for future reference.

例如,您可以使用如下代码:

val df1 = df.alias("A")
df1.join(df2).select(col("A.col"))

This is equivalent to df1.join(df2).select(df1("col")).

  • Support for the explode function.
  • You can invoke table functions in the DataFrame.select method.
  • You can use table functions to read function arguments through the TableFunction.apply method.
  • New session constructor Session.getOrCreate.

改进

  • 将 JDBC 升级到版本 3.14.4。
  • New wrapper for is_null function.
  • 将 Scala 升级到版本 2.12.18。

错误修复

  • 更新了错误的许可证信息。