Jefffrey commented on code in PR #18662:
URL: https://github.com/apache/datafusion/pull/18662#discussion_r2525952400


##########
datafusion/spark/src/function/hash/crc32.rs:
##########
@@ -124,11 +113,12 @@ fn spark_crc32(args: &[ArrayRef]) -> Result<ArrayRef> {
             let input = as_binary_view_array(input)?;
             Ok(spark_crc32_impl(input.iter()))
         }
-        _ => {
-            exec_err!(
-                "Spark `crc32` function: argument must be binary or large 
binary, got {:?}",
-                input.data_type()
-            )
+        DataType::FixedSizeBinary(_) => {
+            let input = as_fixed_size_binary_array(input)?;
+            Ok(spark_crc32_impl(input.iter()))
+        }
+        dt => {
+            internal_err!("Unsupported data type for crc32: {dt}")

Review Comment:
   Added test case: 
https://github.com/apache/datafusion/pull/18662/commits/03539515ec3ded7c056477664b4e3a826b56f576
   
   Raised arrow-rs issue: https://github.com/apache/arrow-rs/issues/8841



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