You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org> on 2026/10/13 02:43:59 UTC

[PR] [python] Align row tracking and data evolution schema validation with… [paimon]

zhuanshenbsj1 opened a new pull request, #10527:
URL: https://github.com/apache/paimon/pull/10527

   ### Purpose
   
   The Python client (pypaimon) does not validate row tracking / data evolution
   options when committing a schema, while the Java engine rejects the same illegal
   table in `SchemaValidation#validateRowTracking`. As a result pypaimon lets users
   create tables that the Java engine would refuse, producing cross-language
   metadata inconsistency.
   
   This PR adds the equivalent validation to pypaimon and aligns the error messages
   with Java. The following illegal `create_table` / alter requests are now rejected:
   
   1. `row-tracking.enabled = true` together with primary keys.
   2. `row-tracking.enabled = true` together with `bucket != -1`.
   3. `data-evolution.enabled = true` without `row-tracking.enabled`.
   
   ### Tests
   
   - `tests/schema_manager_test.py`: new `TestRowTrackingValidation` with both
     negative and positive cases, covering the `create_table` and alter paths:
     - rejects row tracking with a fixed/postpone bucket (`1`, `16`, `-2`);
     - rejects row tracking with a primary key;
     - rejects data evolution without row tracking (missing and explicit `false`);
     - allows legal row-tracking / data-evolution tables (unaware bucket);
     - allows a normal primary-key fixed-bucket table (ensures the check only
       triggers when row tracking is enabled);
     - rejects enabling row tracking via alter on an existing fixed-bucket table.
   - Updated existing tests whose fixtures used option combinations that are now
     correctly rejected (assertions preserved, only the fixtures / assertion points
     were adjusted):
     - `tests/global_index_build_test.py`: the fixed-bucket cases now fail at
       `create_table`, so the assertion moves there;
     - `tests/multimodal_table_test.py::test_get_table_rejects_primary_key_table`:
       the illegal table can no longer be created directly, so it is simulated by
       overwriting the committed schema file (mimicking a table left by an older
       pypaimon version);
     - `tests/manifest/manifest_sidecar_test.py`: a `data-evolution.enabled` fixture
       now also sets `row-tracking.enabled`.
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] Align row tracking and data evolution schema validation with… [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #10527:
URL: https://github.com/apache/paimon/pull/10527#issuecomment-6159181600

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] Align row tracking and data evolution schema validation with… [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #10527:
URL: https://github.com/apache/paimon/pull/10527


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org