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


##########
datafusion/spark/src/function/math/width_bucket.rs:
##########
@@ -466,8 +466,8 @@ mod tests {
         Arc::new(IntervalYearMonthArray::from(vals.to_vec()))
     }
 
-    fn downcast_i32(arr: &ArrayRef) -> &Int32Array {
-        arr.as_any().downcast_ref::<Int32Array>().unwrap()
+    fn downcast_i64(arr: &ArrayRef) -> &Int64Array {
+        arr.as_any().downcast_ref::<Int64Array>().unwrap()

Review Comment:
   we can driveby refactor to replace usages of `downcast_i64` with the simpler 
[`as_primitive`](https://docs.rs/arrow/latest/arrow/array/trait.AsArray.html#method.as_primitive)
   
   e.g.
   
   ```rust
   let out = out.as_primitive::<Int64Type>();
   ```



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