m4ru1 opened a new pull request, #19168:
URL: https://github.com/apache/iceberg/pull/19168

   Parquet Bloom filters hash the raw bytes written to a column, not logical 
decimal values. `ParquetBloomRowGroupFilter` instead hashes decimals using the 
literal's scale and the read schema's minimal byte length, so queries skip 
matching row groups when literal scale differs (`12.5` vs `12.50`) or files use 
non-minimal `FIXED_LEN_BYTE_ARRAY` or `BINARY` encodings, and throw 
`IllegalArgumentException` or truncate values after precision widening. This 
rescales literals to the file column's `DecimalLogicalTypeAnnotation` scale and 
precision (`ROWS_CANNOT_MATCH` if rounding is needed or precision overflows) 
and hashes `INT32`, `INT64`, and `FIXED_LEN_BYTE_ARRAY` decimals using the 
column's physical type and byte length. Because `BINARY` decimals allow 
optional leading sign-extension bytes with distinct hashes, representable 
`BINARY` literals return `ROWS_MIGHT_MATCH`.
   
   Closes #19167
   
   Test plan: `TestBloomRowGroupFilter` cases cover `BINARY` decimals (minimal 
and sign-extended bytes), non-minimal `FIXED_LEN_BYTE_ARRAY(16)`, exact and 
inexact literal rescaling across `INT32`, `INT64`, and `FIXED_LEN_BYTE_ARRAY`, 
widened-precision overflow and `INT32`/`INT64` truncation collisions, and 
unannotated columns; all new regression cases fail on `main` and pass with this 
change.
   
   ---
   **AI Disclosure**
   - Model: Gemini 4 Carbon, GPT-6 Astra
   - Platform/Tool: Antigravity, Codex
   - Human Oversight: fully reviewed
   - Prompt Summary: Fix ParquetBloomRowGroupFilter decimal evaluation for 
non-minimal encodings, scale alignment, and precision widening; the filter 
changes and unit tests were generated, while problem scoping and review 
sign-off were directed by the author.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to