jackylee-ch opened a new pull request, #791: URL: https://github.com/apache/paimon-rust/pull/791
`write_decimal_var_len` pads the variable-length part to a multiple of 8, but Java reserves 16 bytes for every non-compact Decimal — `AbstractBinaryWriter#writeDecimal` does `ensureCapacity(16)`, zeroes both halves, and advances the cursor by 16 unconditionally. So whenever the minimal form fits in 8 bytes (`|unscaled| < 2^63`, e.g. `DECIMAL(38, 18)` holding `1.5`) Rust writes a row 8 bytes shorter than Java's. Decoding is unaffected — both sides read the stored `(offset, size)` — but `hash_code` hashes the whole buffer and feeds `default_bucket`, so the row lands in a different bucket than in Java. The existing test uses `1e19`, whose 9-byte minimal form already rounded up to 16, so this case had no coverage. -- 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]
