jackylee-ch opened a new pull request, #641: URL: https://github.com/apache/paimon-rust/pull/641
`TableSchema::validate_no_reserved_fields` already rejects the five Java `SpecialFields.SYSTEM_FIELD_NAMES` (`_SEQUENCE_NUMBER`, `_VALUE_KIND`, `_LEVEL`, `rowkind`, `_ROW_ID`) and the `_KEY_` prefix — but it is only reachable from `validate_resolved_structure`, which runs when loading an externally-supplied schema. Neither `Schema::new` nor `TableSchema::apply_changes` checked names, so `CREATE TABLE` with a column named `_ROW_ID` was accepted and persisted through every catalog path (including DataFusion DDL), and that column was then silently shadowed by the system value on read. **Fix**: split the name half into a free `validate_no_reserved_field_names(&[DataField])` and call it from both schema paths plus the existing resolved-structure check. The field-id half is unchanged. `pk_hybrid_table_with_reserved_column` deliberately builds a schema carrying `_ROW_ID` to exercise the read-side guard, so it now deserializes that schema from JSON instead of going through `Schema::builder` — which is precisely the case the read guard exists for: metadata written by another engine. -- 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]
