v0.51.0-public.rc1
Pre-release
Pre-release
·
3 commits
to release/0.50.x
since this release
Changelog
[0.51.0-public.rc1] - 2024-11-22
Features and Changes
- Column
ColumnBuilderadds a newwithGenerateExpressionmethod for constructing auto-partition columns - TableSchema
- Added
generatePartitionSpecmethod, used to generate partition information fromRecord - The
setPartitionColumnsmethod now acceptsList<Column>instead ofArrayList<Column>
- Added
- TableCreator
- Added support for
GenerateExpressionand introduced the methodautoPartitionBy, which allows for the creation of AutoPartition tables. - Added support for
ClusterInfo, enabling the creation of Hash/Range Cluster tables. - Added the option to specify
TableFormat, allowing for the creation of tables inAPPEND,TRANSACTION,DELTA,EXTERNAL, andVIEWformats. - Introduced the
selectStatementparameter forcreate table asandcreate view asscenarios. - Added the
getSqlmethod to obtain the SQL statement for table creation. - Now quotes all
Commentparameters to support those that contain special characters. - Integrated DataHub-related table creation parameters (
hubLifecycle,shardNum) intoDataHubInfo. - Renamed the
withJarsmethod towithResourcesto indicate it can use resources other than JAR files. - Renamed the
withBucketNummethod towithDeltaTableBucketNumto indicate this method is for Delta Tables only. - Modified the logic of
withHints,withAlias,withTblProperties, andwithSerdePropertiesmethods, now overwriting previous values instead of merging. - Removed the
createExternalmethod; you can now use thecreatemethod instead.
- Added support for
- Table
- Introduced the
getSchemaVersionmethod, allowing users to retrieve the current schema version of the table. The version number is updated each time a Schema Evolution occurs, and this field is used primarily for specifying when creating a StreamTunnel. - Added
setLifeCycle,changeOwner,changeComment,touch,changeClusterInfo,rename,addColumns,dropColumnsmethods to support modification of table structure.
- Introduced the
- StreamTunnel Modified the initialization logic; if
allowSchemaMismatchis set tofalse, it will automatically retry until the latest version of the table structure is used (with a timeout of 5 minutes).
Fixes
- GenerationExpression Fixed the issue where an exception would be thrown when the
TruncTimewas uppercase during table creation and reloading the table. - TypeInfoParser Can now correctly handle
Structtypes, with fields quoted using backticks inTypeInfo.
更新日志
[0.51.0-public.rc1] - 2024-11-22
功能与变更
- Column
ColumnBuilder新增withGenerateExpression方法,用于构造 auto-partition 列 - TableSchema
- 新增
generatePartitionSpec方法,用于从Record中生成分区信息 setPartitionColumns方法现在接收List<Column>,而不是ArrayList<Column>
- 新增
- TableCreator
- 新增对
GenerateExpression的支持,新增方法autoPartitionBy,现在可以创建 AutoPartition 表了 - 新增对
ClusterInfo的支持,现在可以创建 Hash/Range Cluster 表了 - 新增指定
TableFormat,现在可以指定创建APPEND,TRANSACTION,DELTA,EXTERNAL,VIEW格式的表 - 新增
selectStatement参数,用于create table as和create view as场景 - 新增
getSql方法,用于获取创建表的 SQL 语句 - 现在会对所有的
Comment参数进行 quote,以支持包含特殊字符的Comment参数 - 将 DataHub 相关的建表参数(
hubLifecycle,shardNum) 整合为DataHubInfo - 重命名
withJars方法为withResources,以表示不仅可以使用JAR类型资源 - 重命名
withBucketNum方法为withDeltaTableBucketNum,以表示该方法仅用于 Delta Table - 修改了
withHints,withAlias,withTblProperties,withSerdeProperties方法的逻辑,现在会覆盖之前设置的值,而不是合并 - 移除了
createExternal方法,现在使用create方法即可
- 新增对
- Table
- 新增
getSchemaVersion方法,用户获取当前表结构的版本,用户每次进行 SchemaEvolution 都会更新版本号,目前该字段仅用于在创建 StreamTunnel 时指定 - 新增
setLifeCycle,changeOwner,changeComment,touch,changeClusterInfo,rename,addColumns,dropColumns方法,以支持对表结构进行修改
- 新增
- StreamTunnel 修改初始化逻辑,当指定
allowSchemaMismatch为false时,会自动重试直到使用最新版本的表结构(超时时间为5min)
修复
- GenerationExpression 修复了当建表时
TruncTime为大写,reload table 会抛出异常的问题 - TypeInfoParser 能够正确处理
Struct类型,字段被反引号quote的TypeInfo了