This is an automated email from the ASF dual-hosted git repository.
richox pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new 588f9140 [AURON #1482] Support native avg result cast to return type
(#1483)
588f9140 is described below
commit 588f91401b966bc700d37f030f2a40742df575f3
Author: zhangmang <[email protected]>
AuthorDate: Tue Oct 21 14:14:27 2025 +0800
[AURON #1482] Support native avg result cast to return type (#1483)
---
native-engine/datafusion-ext-plans/src/agg/avg.rs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/native-engine/datafusion-ext-plans/src/agg/avg.rs
b/native-engine/datafusion-ext-plans/src/agg/avg.rs
index f8f70216..7512b774 100644
--- a/native-engine/datafusion-ext-plans/src/agg/avg.rs
+++ b/native-engine/datafusion-ext-plans/src/agg/avg.rs
@@ -165,9 +165,12 @@ impl Agg for AggAvg {
Ok(Arc::new(avgs.with_precision_and_scale(prec, scale)?))
} else {
let counts = counts_zero_free;
- Ok(arrow::compute::kernels::numeric::div(
- &arrow::compute::cast(&sums, &DataType::Float64)?,
- &arrow::compute::cast(&counts, &DataType::Float64)?,
+ Ok(arrow::compute::cast(
+ &arrow::compute::kernels::numeric::div(
+ &arrow::compute::cast(&sums, &DataType::Float64)?,
+ &arrow::compute::cast(&counts, &DataType::Float64)?,
+ )?,
+ &self.data_type,
)?)
}
}