avantgardnerio commented on code in PR #3347:
URL: https://github.com/apache/arrow-datafusion/pull/3347#discussion_r961976592


##########
datafusion/physical-expr/src/aggregate/approx_percentile_cont.rs:
##########
@@ -272,79 +272,129 @@ impl ApproxPercentileAccumulator {
     ) -> Result<Vec<OrderedFloat<f64>>> {
         match values.data_type() {
             DataType::Float64 => {
-                let array = 
values.as_any().downcast_ref::<Float64Array>().unwrap();
+                let array = 
values.as_any().downcast_ref::<Float64Array>().ok_or(
+                    DataFusionError::Internal(format!(
+                        "A Float64 type array, {:?} is somehow not a 
Float64Array",
+                        values

Review Comment:
   I assume this won't print out 1GB of values in binary?



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

Reply via email to