geoffreyclaude commented on code in PR #25186:
URL: https://github.com/apache/datafusion/pull/25186#discussion_r4146956739


##########
datafusion/common/src/utils/mod.rs:
##########
@@ -1455,6 +1455,15 @@ pub fn normalize_float_zero(array: &ArrayRef) -> 
ArrayRef {
     const NEG_ZERO_F32_BITS: u32 = (-0.0_f32).to_bits();
     const NEG_ZERO_F64_BITS: u64 = (-0.0_f64).to_bits();
     match array.data_type() {
+        DataType::Dictionary(_, value_type) if has_float_leaf(value_type) => {
+            let dictionary = array.as_any_dictionary();
+            let values = normalize_float_zero(dictionary.values());
+            if Arc::ptr_eq(&values, dictionary.values()) {
+                Arc::clone(array)
+            } else {
+                dictionary.with_values(values)
+            }
+        }

Review Comment:
   You're right: I'm moving the optimization to a stacked PR as this one should 
be purely about the functional fix.



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