You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "rich7420 (via GitHub)" <gi...@apache.org> on 2026/10/20 18:23:17 UTC

[I] Native Iceberg scan drops -0.0 rows for floating-point predicates [datafusion-comet]

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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org