raghavyadav01 opened a new pull request, #20398:
URL: https://github.com/apache/pinot/pull/20398

   Fixes the BIG_DECIMAL part of #9899.
   
   A BIG_DECIMAL value was hashed as a different string on each path. Ingest 
strips trailing zeros, so 100 is stored as `1E+2`:
   
   - build-time creator: `toString()`, gives `1E+2`
   - load-time handler: `toPlainString()`, gives `100`
   - query side: `toString()` of the parsed literal, gives `100`
   
   So `decimalCol = 100`, `100.0` and `1e2` pruned a segment that holds 100. 
Creating a bloom filter on load for a BIG_DECIMAL column also failed with 
`Unsupported data type: BIG_DECIMAL`.
   
   This hashes `stripTrailingZeros().toPlainString()` on all three paths, and 
lets the load-time handler read BIG_DECIMAL dictionaries. The query side also 
still checks the scientific form (`1E-7`), so segments created before this 
change keep matching.
   
   FLOAT, DOUBLE, BOOLEAN and TIMESTAMP are not affected: the query value is 
converted to the column type before hashing, so `value = 1` already matches a 
stored `1.0`. The new test covers them too.
   
   Tests (in `BloomFilterSegmentPrunerTest`): equivalent literal forms for each 
type, with dictionary and raw columns, bloom filter created at build time and 
on load, plus the old scientific form with a mocked reader. Without the change 
the BIG_DECIMAL modes fail (wrong prune, and the load error); with it all pass.


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

  • [PR] Use one normalized string ... raghavyadav01 (via GitHub) via commits

Reply via email to