rich7420 opened a new issue, #7136:
URL: https://github.com/apache/datafusion-comet/issues/7136

   ### Describe the bug
   
   Native Iceberg scans push FLOAT/DOUBLE comparisons into iceberg-rust, which 
filters rows with Arrow's IEEE 754 total order. Unlike Spark, that order treats 
`-0.0` and `0.0` as different values, so `f = 0.0` drops `-0.0` rows. The 
post-scan filter cannot restore them.
   
   ### Steps to reproduce
   
   ```sql
   CREATE TABLE t (f DOUBLE) USING iceberg;
   -- Keep both rows in one data file. Iceberg's own file pruning already skips 
a file holding only -0.0.
   INSERT INTO t SELECT /*+ COALESCE(1) */ * FROM VALUES (CAST('-0.0' AS 
DOUBLE)), (0.0) AS v(f);
   SELECT * FROM t WHERE f = 0.0;
   ```
   
   Reproduced at 9e1364914.
   
   ### Expected behavior
   
   Both rows, as Spark returns. Comet returns only `0.0`.
   
   ### Additional context
   
   Reported by @andygrove in #6847, which stops pushing zero literals and range 
comparisons on these columns. On the same table, `f >= 0.0` and `f IN (0.0, 
1.0)` also drop `-0.0`, and `f <= CAST('-0.0' AS DOUBLE)` drops `0.0`.
   


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