Skip to content

Releases: aliyun/aliyun-odps-jdbc

v3.9.0-rc1

11 Oct 05:54
Compare
Choose a tag to compare
v3.9.0-rc1 Pre-release
Pre-release
update version to 3.9.0-rc1

v3.9.0-rc0

10 Oct 05:44
Compare
Choose a tag to compare
v3.9.0-rc0 Pre-release
Pre-release

Full Changelog: v3.8.0...v3.9.0-rc0

ODPS-JDBC 3.8.0

09 Oct 12:20
Compare
Choose a tag to compare

Changelog

[3.8.0] - 2024-10-09

Welcome to the MCQA 2.0 Era!

New Features

  • Support for submitting MCQA 2.0 jobs. Enable MCQA 2.0 mode by setting quotaName to interactive quota and turning on interactiveMode=true.
  • New parameter useInstanceTunnel, which specifies whether to use Tunnel to retrieve data. The default value is true, consistent with previous behavior.
    If instanceTunnel is turned off, the system will use RESTful API to retrieve data under this mode:
    • Execution speed will be faster.
    • Only 10,000 results can be returned; if this limit is exceeded, the data will be truncated.
    • Return values are of String type, suitable only for display-type jobs.
  • New executable class JdbcRunner, which allows executing JDBC tasks via a connection string and SQL file. The usage is as follows:
 java -cp odps-jdbc-version-jar-with-dependencies.jar com.aliyun.odps.jdbc.JdbcRunner <jdbc_url> <sql_file>
  • Added some debug settings that modify the current Connection configuration (effectively re-acquiring the Connection to replace the current one).
    • set tunnelEndpoint = xxx; modifies the tunnelEndpoint parameter of the current Connection.
    • set useTunnel = true/false; modifies the useInstanceTunnel parameter of the current Connection.
    • set interactiveMode = true/false; modifies the interactiveMode parameter of the current Connection.

Changes

  • Removed handling of # comment in the removeComment method: it no longer removes comments after the #. This change resolves many issues where valid SQL statements were incorrect due to the removal of #.
  • Updated odps-sdk version to 0.50.0-public.

更新日志

[3.8.0] - 2024-10-9

欢迎进入 MCQA 2.0 时代!

新功能

  • 支持提交 MCQA 2.0 作业。通过指定 quotaName 为交互式 quota,并开启 interactiveMode=true 即可开启 MCQA 2.0 模式。

  • 新增参数 useInstanceTunnel,用于指定是否使用 Tunnel 来获取数据,默认值为 true,与原行为一致。

    如关闭 instanceTunnel,则会使用 Restful API 来获取数据,在这个模式下

    • 执行速度会更快。
    • 只能返回 10000 条结果,如超出这个限制,数据会被截断。
    • 返回值均为String类型,仅适合屏显型作业。
  • 新增 JdbcRunner 可执行类,可以通过链接串和SQL文件,执行JDBC任务。使用方式如下

 java -cp odps-jdbc-version-jar-with-dependencies.jar com.aliyun.odps.jdbc.JdbcRunner <jdbc_url> <sql_file>
  • 新增一些调试用 settings,这些 setting 会修改当前 Connection 的配置(相当于重新获取一次 Connection 并替代当前的 Connection)。
    • set tunnelEndpoint = xxx; 修改当前 Connection 的 tunnelEndpoint 参数
    • set useTunnel = true/false; 修改当前 Connection 的 useInstanceTunnel 参数
    • set interactiveMode = true/false; 修改当前 Connection 的 interactiveMode 参数

变更

  • 移除 removeComment 方法中的 # 注释处理:现已不再去除 # 后的注释,这一改动解决了许多正常 SQL 语句因 # 而被误删的问题。
  • 更新 odps-sdk 版本到 0.50.0-public

v3.8.0-rc2

26 Sep 08:03
Compare
Choose a tag to compare
v3.8.0-rc2 Pre-release
Pre-release

Full Changelog: v3.8.0-rc1...v3.8.0-rc2

v3.8.0-rc1

24 Sep 08:21
Compare
Choose a tag to compare
v3.8.0-rc1 Pre-release
Pre-release

Full Changelog: v3.8.0-rc0...v3.8.0-rc1

v3.8.0-rc0

19 Sep 08:15
Compare
Choose a tag to compare
v3.8.0-rc0 Pre-release
Pre-release

Full Changelog: v3.7.0...v3.8.0-rc0

ODPS-JDBC 3.7.0

29 Aug 08:42
Compare
Choose a tag to compare

Changelog

[3.7.0] - 2024-08-29

Compatibility with Metabase!

Learn how to connect MaxCompute to Metabase

Important Changes

  • Optimized the DatabaseMetadata.getColumns Logic: Enhanced compatibility for three-tier and two-tier model users as follows:
    • Three-tier model (project.schema.table):
      • Ignores the passed catalog, using the project name from the JDBC connection, along with the schemaPattern and tableNamePattern parameters to compose the table reference.
    • Two-tier model (project.table):
      • Ignores the schemaPattern, treating the catalog as the project name, and combines it with the tableNamePattern parameter to form the table reference.
    Three-tier model: catalog.schemaPattern.tableNamePattern -> project.schemaPattern.tableNamePattern
    Two-tier model: schemaPattern.tableNamePattern -> catalog.tableNamePattern
    

Changes

  • Enhanced SQLException Messages: The exception message now includes the correct ErrorMessage.
  • Updated odps-sdk Version: Updated to 0.48.8-public.

更新日志

[3.7.0] - 2024-08-29

兼容 Metabase!

了解如何连接 MaxCompute 与 Metabase

重要变更

  • 优化 DatabaseMetadata.getColumns 逻辑:增强了三层模型和两层模型使用者的兼容性,具体如下:

    • 三层模型(project.schema.table)
      • 忽略传入的 catalog,使用 JDBC 链接中的项目名,以及参数中的 schemaPatterntableNamePattern 组合表引用。
    • 两层模型(project.table)
      • 忽略 schemaPattern,将 catalog 视为项目名,并结合参数中的 tableNamePattern 组成表引用。
    三层模型:catalog.schemaPattern.tableNamePattern -> project.schemaPattern.tableNamePattern
    两层模型:schemaPattern.tableNamePattern -> catalog.tableNamePattern
    

变更

  • 增强 SQLException 异常信息:异常信息中新增了正确的 ErrorMessage。
  • 更新 odps-sdk 版本:已更新至 0.48.8-public

ODPS-JDBC 3.6.0

07 Aug 08:34
Compare
Choose a tag to compare

Changelog

[3.6.0] - 2024-08-07

Say No to SQLFeatureNotSupportedException!

New Features

  • LocalDate Support: PrepareStatement.setObject now supports LocalDate type for MaxCompute DATE type.
  • SQL Injection Check: New parameter skipSqlInjectCheck allows skipping the SQL injection check, applicable when setting String type fields.
  • TIMESTAMP_NTZ Support: DatabaseMetadata now also supports MaxCompute TIMESTAMP_NTZ type fields.
  • Extended PrepareStatement Methods:
    • Implemented setObject(int, Object, int), setObject(int, Object, int, int), setObject(int, Object, SQLType), and setObject(int, Object, SQLType, int) methods, which will no longer throw exceptions but will return results from setObject(int, Object), ignoring additional fields.
  • Extended ResultSet Methods:
    • Added getObject(int, Map) and getObject(String, Map) methods, which no longer throw exceptions but ignore the map and call ResultSet.getObject(int) to return results.
    • Added getObject(int, Class<T>) and getObject(String, Class<T>) methods, which first call ResultSet.getObject(int) before trying to convert the result to the specified type.
  • Optimized Statement Method: The createStatement(int, int, int) method now no longer throws exceptions but ignores resultSetHoldability, returning the result of Statement.createStatement(int, int).

Changes

  • Enhanced DatabaseMetadata.getColumns: The interface now returns IS_AUTOINCREMENT and IS_GENERATEDCOLUMN fields to comply with JDBC specifications.
  • Updated odps-sdk Version: Updated to 0.48.7-public.
    • The new version applies key-path-end optimizations, improving efficiency during offline job execution, especially in complex queries.

更新日志

[3.6.0] - 2024-08-07

拒绝 SQLFeatureNotSupportedException!

新增功能

  • LocalDate 支持PrepareStatement.setObject 现支持 LocalDate 类型,用于 MaxCompute 的 DATE 类型。
  • SQL 注入检查:新增参数 skipSqlInjectCheck,可跳过对 SQL 注入的检查,适用于设置 String 类型字段时。
  • TIMESTAMP_NTZ 类型支持DatabaseMetadata 现增加对 MaxCompute TIMESTAMP_NTZ 类型字段的支持。
  • 扩展 PrepareStatement 方法
    • 实现了 setObject(int, Object, int)setObject(int, Object, int, int)setObject(int, Object, SQLType)setObject(int, Object, SQLType, int) 方法,现不再抛出异常,而是返回 setObject(int, Object) 的结果,忽略多余字段。
  • 扩展 ResultSet 方法
    • 新增 getObject(int, Map)getObject(String, Map) 方法,现不抛出异常,而是忽略 map,调用 ResultSet.getObject(int) 返回结果。
    • 新增 getObject(int, Class<T>)getObject(String, Class<T>) 方法,首先调用 ResultSet.getObject(int),然后尝试将结果转换为指定类型。
  • 优化 Statement 方法createStatement(int, int, int) 方法现在不再抛出异常,而是忽略 resultSetHoldability,返回 Statement.createStatement(int, int) 的结果。

变更

  • 增强 DatabaseMetadata.getColumns:接口返回值新增 IS_AUTOINCREMENTIS_GENERATEDCOLUMN 字段,以符合 JDBC 规范。
  • 更新 odps-sdk 版本:已更新至 0.48.7-public
    • 新版本应用了 key-path-end 优化,提高了在执行离线作业时的效率,在较复杂query中提升明显。

odps-jdbc 3.6.0-rc0

02 Aug 05:43
a72db69
Compare
Choose a tag to compare
odps-jdbc 3.6.0-rc0 Pre-release
Pre-release
Merge pull request #154 from aliyun/metabase

update version to 3.6.0-rc0

ODPS-JDBC 3.5.8

22 Jul 07:54
Compare
Choose a tag to compare

Changelog

[3.5.8] - 2024-07-22

New Features

  • Delta Table Write Support: PrepareStatement now supports write operations on Delta Tables.
  • Skip SQL Rewrite: New parameter skipSqlRewrite, with a default value of true, allows skipping SQL statement rewriting during comment removal. Enabling this parameter may cause settings submitted with the SQL to become ineffective.

Changes

  • Optimized Comment Removal Logic: The logic has been optimized to avoid throwing exceptions when processing very long queries. It fixes the issue of potentially removing SQL hints during comment removal.
  • SDK Update: The odps-sdk has been updated to 0.48.6-public.
    • The new version reduces network overhead, slightly improving efficiency during offline job execution.

更新日志

[3.5.8] - 2024-07-22

新增功能

  • Delta Table 写入支持PrepareStatement 现支持对 Delta Table 的写入操作。
  • 跳过 SQL 重写:新增参数 skipSqlRewrite,默认值为true,可在去除注释过程中跳过对 SQL 语句的重写。启用该参数可能导致与 SQL 一起提交的 settings 失效。

变更

  • 优化去除注释逻辑:在处理非常长的查询时,已优化逻辑以避免抛出异常。修复了在去除注释的过程中,可能将 SQL hints 也去掉的问题。
  • SDK 更新:odps-sdk 已更新至 0.48.6-public
    • 新版本减少了网络开销,略微提高在执行离线作业时的效率。