Skip to content

v0.48.5-public

Choose a tag to compare

@idleyui idleyui released this 18 Jun 03:41
· 14 commits to release/0.48.x since this release

Changelog

[0.48.5-public] - 2024-06-18

Added

  • Added the getPartitionSpecs method to the Table interface. Compared to the getPartitions method, this method does not require fetching detailed partition information, resulting in faster execution.

Changes

  • Removed the isPrimaryKey method from the Column class. This method was initially added to support users in specifying certain columns as primary keys when creating a table. However, it was found to be misleading in read scenarios, as it does not communicate with the server. Therefore, it is not suitable for determining whether a column is a primary key. Moreover, when using this method for table creation, primary keys should be table-level fields (since primary keys are ordered), and this method neglected the order of primary keys, leading to a flawed design. Hence, it will be removed in version 0.48.6.

    For read scenarios, users should use the Table.getPrimaryKey() method to retrieve primary keys. For table creation, users can now use the withPrimaryKeys method in the TableCreator to specify primary keys during table creation.

Fixes

  • Fixed an issue in the RecordConverter where formatting a Record of type String would throw an exception when the data type was byte[].

更新日志

[0.48.5-public] - 2024-06-18

新增

  • Table 接口新增 getPartitionSpecs 方法, 相比 getPartitions 方法,该方法无需获取分区的详细信息,进而获得更快的执行速度

变更

  • 移除了Column类中的isPrimaryKey
    方法。这个方法最初是为了支持用户在创建表时指定某些列为主键。然而,在读取场景下,这个方法容易引起误解,因为它并不会与服务端通信,所以当用户希望知道某列是否为主键时,这个方法并不适用。此外,在使用该方法建表时,主键应当是表级别的字段(因为主键是有序的),而该方法忽略了主键的顺序,设计上不合理。因此,将在0.48.6版本中移除了该方法。
    在读取场景,用户应当使用Table.getPrimaryKey()方法来获取主键。
    在建表场景,改为在TableCreator中增加withPrimaryKeys方法以达成建表时指定主键的目的。

修复

修复了RecordConverter在format String类型的Record,当数据类型为byte[] 时,会抛出异常的问题