Repository navigation
Conversation
JingsongLi
left a comment
There was a problem hiding this comment.
[P2] Allow unrelated ALTERs on tables with a legacy empty option
The new check runs on the complete resulting schema. It therefore also rejects unrelated ALTERs when the table already has a persisted sequence.field='' from a previous PyPaimon release. I recreated the legacy schema the same way as the removal test and applied SetOption('write-only', 'true'). The original validator accepted it and published schema 1. This head rejects it and leaves schema 0.
Please reject explicitly setting the empty string on CREATE or ALTER SET, while allowing an unrelated ALTER to preserve an already-stored value. The existing REMOVE recovery path can still clear it. This is independent of the whitespace/comma follow-up. All 194 selected pure Python tests passed.
Thanks for catching this, fixed with a new commit. CREATE and explicit ALTER SET reject sequence.field='' now. Unrelated ALTERs can preserve the legacy value, and REMOVE still clears it. |
f90a93a to
13d98b3
Compare
Akash3121
left a comment
There was a problem hiding this comment.
LGTM, thanks for the update!
Purpose
Fixes #11639
PyPaimon accepts and saves an empty
sequence.fieldon CREATE and ALTER SET. On a table ordered byts, setting the option to an empty string can change which row is returned without writing any new data because pure Python reads fall back to the default record ordering.Reject the explicit empty string before publishing the schema. A rejected ALTER preserves the previous schema and ordering. Users can omit or remove the option to use the default record ordering.
Tests