JingsongLi commented on PR #10291: URL: https://github.com/apache/paimon/pull/10291#issuecomment-5935813844
[P2] Ignore transient nested field IDs when checking whether the multiset element changed (`NestedSchemaUtils.java`, lines 244–250). `DataType.equals` includes ROW field IDs. `FlinkCatalog` converts the old and new logical types separately, assigning IDs in traversal order, so adding a sibling before an unchanged `MULTISET<ROW<...>>` changes those temporary IDs. This PR then rejects a valid change to the sibling with “Cannot update the element type … from ROW<`x` INT> to ROW<`x` INT>”. Actual Flink TableEnvironment reproduction: ```sql CREATE TABLE T (v ROW<a INT, m MULTISET<ROW<x INT>>>); ALTER TABLE T MODIFY v ROW<a INT, added STRING, m MULTISET<ROW<x INT>>>; ``` The PR rejects this at `v.m`; the identical SQL with the merge-base `NestedSchemaUtils` succeeds and adds `v.added` while preserving the existing multiset schema. No element type or nullability changes here. Compare element types while ignoring synthetic field IDs, while retaining rejection of actual type/nullability changes. Validation: normal Maven `NestedSchemaUtilsTest` and `SchemaManagerTest` passed (94 tests). Separate actual Flink DDL checks confirmed that genuine INT→BIGINT and element-nullability changes are rejected before schema publication, and top-level multiset nullability remains supported. The sibling case above fails only with the new equality guard. -- 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]
