sundapeng commented on code in PR #8728:
URL: https://github.com/apache/paimon/pull/8728#discussion_r3610957829
##########
paimon-core/src/main/java/org/apache/paimon/catalog/CatalogUtils.java:
##########
@@ -173,6 +179,7 @@ private static void validateFormatTableOptions(Options
options, boolean dataToke
options.get(PRIMARY_KEY) == null,
"Cannot define %s for format table.",
PRIMARY_KEY.key());
+ validateManagedFormatTableOptions(options);
Review Comment:
🟡 **[minor] [migration]** `validateCreateTable` 现在对所有 catalog 都拒绝了此前无害的
`metastore.partitioned-table=true` + `format-table.implementation=engine` 组合
`validateManagedFormatTableOptions` 被加入
`validateFormatTableOptions`(CatalogUtils.java:182),而该方法在 `validateCreateTable`
中执行 —— 被 AbstractCatalog.createTable(filesystem/hive 基类)、JdbcCatalog 和
RESTCatalog 共同使用。本 MR 之前,在任何 catalog 中同时设置 `metastore.partitioned-table=true` 和
`format-table.implementation=engine` 都会被接受且完全惰性(本 MR 新增文档自己也说明其他 catalog "treat
the option as inert")。本 MR 之后,同样的 CREATE TABLE 语句在**所有** catalog 中都抛
IllegalArgumentException,会打断携带该无害组合的存量 DDL 脚本 / IaC 模板。对 REST managed
场景做硬失败是合理的加固,但对选项仍然惰性的 catalog 一并拒绝是一个向后不兼容的行为变更。
**证据**:CatalogUtils.java:182 在 `validateFormatTableOptions` 中无条件调用
`validateManagedFormatTableOptions(options)`;`validateCreateTable` 被
AbstractCatalog.createTable(AbstractCatalog.java:429)、JdbcCatalog.createTable(JdbcCatalog.java:376)和
RESTCatalog.createTable(RESTCatalog.java:577)调用。
**建议**:将 engine 组合的拒绝限定在实际支持 managed partitions 的 catalog 上(把校验移入
`validateManagedFormatTableCatalog`,或基于
`catalog.supportsManagedFormatTablePartitions()` 门控);或者在 migration/release
notes 中显式说明该组合从"惰性接受"变为"拒绝"。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]