You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/02 20:12:00 UTC
[GitHub] [arrow-datafusion] avantgardnerio commented on a diff in pull request #3347: Replace `unwrap` in `convert_to_ordered_float`
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org