You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ho...@apache.org on 2021/08/07 17:35:37 UTC
[arrow-datafusion] branch master updated: Implement serde for MIN
and MAX (#833)
This is an automated email from the ASF dual-hosted git repository.
houqp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new ea1356f Implement serde for MIN and MAX (#833)
ea1356f is described below
commit ea1356f6af2ca7cc54b9fdca56ad861d3f7f0976
Author: Andy Grove <an...@gmail.com>
AuthorDate: Sat Aug 7 11:35:30 2021 -0600
Implement serde for MIN and MAX (#833)
---
ballista/rust/core/src/serde/physical_plan/to_proto.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ballista/rust/core/src/serde/physical_plan/to_proto.rs b/ballista/rust/core/src/serde/physical_plan/to_proto.rs
index ec5ec7c..48b2134 100644
--- a/ballista/rust/core/src/serde/physical_plan/to_proto.rs
+++ b/ballista/rust/core/src/serde/physical_plan/to_proto.rs
@@ -47,7 +47,7 @@ use datafusion::{
use datafusion::physical_plan::{
empty::EmptyExec,
- expressions::{Avg, BinaryExpr, Column, Sum},
+ expressions::{Avg, BinaryExpr, Column, Max, Min, Sum},
Partitioning,
};
use datafusion::physical_plan::{AggregateExpr, ExecutionPlan, PhysicalExpr};
@@ -421,6 +421,10 @@ impl TryInto<protobuf::PhysicalExprNode> for Arc<dyn AggregateExpr> {
Ok(protobuf::AggregateFunction::Sum.into())
} else if self.as_any().downcast_ref::<Count>().is_some() {
Ok(protobuf::AggregateFunction::Count.into())
+ } else if self.as_any().downcast_ref::<Min>().is_some() {
+ Ok(protobuf::AggregateFunction::Min.into())
+ } else if self.as_any().downcast_ref::<Max>().is_some() {
+ Ok(protobuf::AggregateFunction::Max.into())
} else {
Err(BallistaError::NotImplemented(format!(
"Aggregate function not supported: {:?}",