jackylee-ch commented on PR #976:
URL: https://github.com/apache/paimon-rust/pull/976#issuecomment-5944273223

   Addressed.
   
   `validate_key_field_types` now splits the two cases. Primary and partition 
keys still reject every non-primitive type 
(`MAP`/`ARRAY`/`MULTISET`/`ROW`/`VECTOR`/`VARIANT`), matching Java 
`validateOnlyContainPrimitiveType`. Bucket keys — which only hash a 
`BinaryRow`, need no ordering, and already encode `VARIANT` — mirror Java's 
narrower nested-type bucket check (`ARRAY`/`MULTISET`/`MAP`/`ROW`), so a 
`VARIANT` (or `VECTOR`) hash key stays valid.
   
   This covers both the create and the existing-table ALTER regressions: the 
check runs inside `validate_final_schema`, which create and schema-change 
share, so an `alter_table` that touches only an unrelated column no longer 
fails with the bucket-key error.
   
   Regressions: `test_variant_bucket_key_is_accepted` builds a `bucket-key = v` 
table on a `VARIANT` column, and 
`test_schema_validation_rejects_non_primitive_bucket_key` keeps an `ARRAY` 
bucket key rejected. I verified non-vacuity: re-adding `VARIANT` to the bucket 
rejection makes the accept test fail; the split passes it while still rejecting 
`ARRAY`.
   
   Rebased onto current main. The schema `bucket_*`/key-type tests pass; 
`clippy -p paimon --all-targets -D warnings` is clean.
   


-- 
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]

Reply via email to