jackylee-ch opened a new pull request, #10366:
URL: https://github.com/apache/paimon/pull/10366

   ### Purpose
   
   `CoreOptions.varTypeSize()` returned `zorder.var-length-contribution` 
unchecked. It
   sizes the `new byte[]` z-order buffers in `ZIndexer` and `SparkZOrderUDF`, 
so a negative
   value crashes zorder clustering / sort-compact over a `CHAR` / `VARCHAR` / 
`BINARY` /
   `VARBINARY` column with `NegativeArraySizeException`, and `0` silently drops 
the
   variable-length column from the z-order curve.
   
   This validates the option is positive in the getter — the single accessor 
feeding the
   core, Flink and Spark zorder sorters — mirroring the other positive-int 
option guards in
   `CoreOptions`. The default is `8`, so valid configurations are unaffected.
   
   ### Tests
   
   `CoreOptionsTest#testVarTypeSizeRejectsNonPositive` asserts `0` and `-1` 
throw a clear
   `IllegalArgumentException`.
   
   ### API and Format
   
   No change.
   
   ### Documentation
   
   No change.
   


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