github-actions[bot] commented on code in PR #66422:
URL: https://github.com/apache/doris/pull/66422#discussion_r3710474989


##########
be/src/exprs/expr_zonemap_filter.cpp:
##########
@@ -84,11 +85,19 @@ bool bloom_filter_may_contain(const 
BloomFilterEvalContext::SlotBloomFilter& slo
     }
     case TYPE_FLOAT: {
         const float typed_value = value.get<TYPE_FLOAT>();
+        // Doris equates all NaN payloads, but Parquet Bloom hashes their 
physical bits, so a
+        // negative raw-byte probe cannot prove that an equivalent NaN is 
absent.
+        if (std::isnan(typed_value)) {
+            return true;
+        }
         return slot_filter.bloom_filter->test_bytes(reinterpret_cast<const 
char*>(&typed_value),
                                                     sizeof(typed_value));
     }
     case TYPE_DOUBLE: {
         const double typed_value = value.get<TYPE_DOUBLE>();
+        if (std::isnan(typed_value)) {

Review Comment:
   [P1] Apply floating equivalence handling to the legacy Parquet path
   
   This helper fixes FileScannerV2, but `enable_file_scanner_v2=false` still 
routes supported queries through V1. Its comparison and IN predicates probe raw 
FLOAT/DOUBLE bytes, so a Bloom containing NaN payload A can reject Doris-equal 
payload B; the same probes can reject the opposite signed zero even though 
Doris equates the zeros (and V1 statistics deliberately widens zero bounds 
before Bloom evaluation). Please preserve both equivalence classes in the 
legacy EQ and IN probes, with FLOAT/DOUBLE V1 regressions, or otherwise ensure 
the fix covers every selectable reader.



##########
be/src/exprs/expr_zonemap_filter.cpp:
##########
@@ -84,11 +85,19 @@ bool bloom_filter_may_contain(const 
BloomFilterEvalContext::SlotBloomFilter& slo
     }
     case TYPE_FLOAT: {
         const float typed_value = value.get<TYPE_FLOAT>();
+        // Doris equates all NaN payloads, but Parquet Bloom hashes their 
physical bits, so a
+        // negative raw-byte probe cannot prove that an equivalent NaN is 
absent.
+        if (std::isnan(typed_value)) {

Review Comment:
   [P1] Keep signed-zero probes conservative too
   
   Doris equality treats `+0.0` and `-0.0` as equal (`Compare::equal` falls 
through to native floating equality), but Parquet Bloom hashes their distinct 
IEEE bytes. For a row group whose FLOAT/DOUBLE Bloom contains only `-0.0`, a 
predicate `col = +0.0` or `col IN (+0.0)` reaches this branch, misses the raw 
probe, and returns `kNoMatch`, so V2 drops rows that residual evaluation would 
match (and the reverse signs fail symmetrically). Please also handle zero 
conservatively, or probe both zero encodings, and cover EQ/IN in both widths.



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