You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2024/03/12 15:51:03 UTC

Re: [PR] Fix ApproxPercentileAccumulator on zero values [arrow-datafusion]

viirya commented on code in PR #9582:
URL: https://github.com/apache/arrow-datafusion/pull/9582#discussion_r1521721888


##########
datafusion/physical-expr/src/aggregate/approx_percentile_cont.rs:
##########
@@ -391,7 +391,7 @@ impl Accumulator for ApproxPercentileAccumulator {
 
     fn evaluate(&mut self) -> Result<ScalarValue> {
         if self.digest.count() == 0.0 {
-            return exec_err!("aggregate function needs at least one non-null element");
+            return Ok(ScalarValue::Null);

Review Comment:
   This is null type instead of `return_type`.



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