wForget commented on code in PR #1295:
URL: https://github.com/apache/datafusion-comet/pull/1295#discussion_r1919468710


##########
native/spark-expr/src/hash_funcs/utils.rs:
##########
@@ -106,17 +106,28 @@ macro_rules! hash_array_primitive_float {
 
 #[macro_export]
 macro_rules! hash_array_decimal {
-    ($array_type:ident, $column: ident, $hashes: ident, $hash_method: ident) 
=> {
+    ($array_type:ident, $column: ident, $hashes: ident, $hash_method: ident, 
$precision: ident) => {
         let array = $column.as_any().downcast_ref::<$array_type>().unwrap();
+        let precision = *$precision;
 
         if array.null_count() == 0 {
             for (i, hash) in $hashes.iter_mut().enumerate() {
-                *hash = $hash_method(array.value(i).to_le_bytes(), *hash);
+                // when precision is less than or equal to 18, spark use 
deimal long value to calculate hash.

Review Comment:
   thank you, changed



-- 
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-unsubscr...@datafusion.apache.org

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


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

Reply via email to