sundapeng commented on code in PR #8728:
URL: https://github.com/apache/paimon/pull/8728#discussion_r3610937104
##########
paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java:
##########
@@ -567,8 +575,13 @@ public void createTable(Identifier identifier, Schema
schema, boolean ignoreIfEx
checkNotBranch(identifier, "createTable");
checkNotSystemTable(identifier, "createTable");
validateCreateTable(schema, dataTokenEnabled);
- createExternalTablePathIfNotExist(schema);
tableDefaultOptions.forEach(schema.options()::putIfAbsent);
Review Comment:
🟡 **[minor] migration — catalog 级 table-default 选项参与 managed format table
校验,可能破坏现有工作流**
在 RESTCatalog.createTable
中,`tableDefaultOptions.forEach(schema.options()::putIfAbsent)` 现在在
`validateManagedFormatTableOptions` 和 `validateManagedFormatTableCatalog`
**之前**执行。
如果 REST catalog 配置了
`table-default.metastore.partitioned-table=true`(对于希望所有表都进行分区管理的组织来说是合理配置),则:
1. 使用 `format-table.implementation=engine` 创建 format table 将失败(即使用户从未显式设置
partitioned 选项)
2. 创建外部 format table(带 PATH)将失败(must be an internal table)
replaceTable(第 661-667 行)同理。这对依赖 catalog 默认值对 format table 不生效的现有 SQL
工作流是**破坏性变更**。
**建议**: 仅对用户在建表语句中显式设置的选项执行 managed format table 校验,而非 catalog 级默认值。或者跟踪哪些
key 是用户指定的 vs 默认注入的,跳过默认注入的校验。至少在文档中说明设置
`table-default.metastore.partitioned-table=true` 将拒绝 engine 实现或外部路径的 format
table。
--
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]