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

   Addressed.
   
   `validate_bucket_count` now parses the raw value exactly as 
`CoreOptions::bucket()` does — without trimming — so a padded `bucket=' 4 '` is 
rejected up front instead of passing validation and then running as dynamic 
(-1) at runtime. The validator and the runtime now share one integer grammar.
   
   This runs on both create and alter: `validate_bucket_count` is called from 
`validate_final_schema`, which create and schema-change share (per its own 
comment), so the padded value is rejected on the alter-options path too.
   
   Regression `bucket_padded_value_is_rejected_matching_runtime` pins the 
resulting mode: it asserts `CoreOptions::bucket()` reads `' 4 '` as -1 (the 
silent fallback), that `' 4 '` is now rejected at build with the integer error, 
and that the accepted `'4'` runs as the fixed count 4. I verified non-vacuity: 
restoring the validator's `.trim()` makes the padded value pass validation and 
the test fail; parsing the raw value passes.
   
   Rebased onto current main. The schema `bucket_*` 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