skyyyy955 commented on PR #11028:
URL: https://github.com/apache/paimon/pull/11028#issuecomment-6720935978
Thanks for adding these checks. I found a related `alter_table` case on
master `b000c3945f`. With a table containing `id BIGINT PRIMARY KEY` and `value
STRING` (`bucket=1`), this succeeds:
```python
catalog.alter_table("default.t", [
SchemaChange.rename_column("id", "middle"),
SchemaChange.rename_column("middle", "new_id"),
])
```
The saved schema has fields `[new_id, value]` but `primaryKeys=[middle]`. A
fresh catalog then fails to load the table with `KeyError: 'middle'`. I
reproduced this after writing and reading back two Parquet rows, with the
Python backends on Windows.
Even if chained renames aren't supported, rejecting this before persisting
the schema would keep the original table usable. Would you prefer to cover that
validation here or in a follow-up? Happy to help with a catalog-level
regression test.
--
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]