mohitgurav20 commented on PR #26000:
URL: https://github.com/apache/datafusion/pull/26000#issuecomment-6741096765

   Yeah that's a legit bug, thanks for catching it. The problem is 
is_fixed_width_type was lumping floats in with integers, which breaks down 
because the two codepaths disagree on -0.0/0.0 — GROUP BY treats them equal 
(IEEE 754), but the native accumulator hashes raw bits so they end up in 
separate buckets. Net result: count(DISTINCT f) changes from 2 to 3 on your 
example, which is wrong.
   
   Pulled floats out of is_fixed_width_type so prefer_memory never skips the 
rewrite for float columns. Added a plan-level unit test confirming the rewrite 
still fires with prefer_memory=true on a Float64 column, and the .slt test with 
(0.0, -0.0, 1.5) verifying the count stays at 2 under both settings.
   
   On the config overlap with #25988 — makes sense to let @mkleen weigh in 
first before I touch that. If the consensus is to fold both into one knob I'm 
happy to do that in a follow-up.


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