This is an automated email from the ASF dual-hosted git repository.
viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 61ae79f34c Remove redundant type check in Avg (#7374)
61ae79f34c is described below
commit 61ae79f34c63ed16e5ce291ff65e704dd93a603e
Author: Liang-Chi Hsieh <[email protected]>
AuthorDate: Tue Aug 22 09:24:48 2023 -0700
Remove redundant type check in Avg (#7374)
---
datafusion/physical-expr/src/aggregate/average.rs | 6 ------
1 file changed, 6 deletions(-)
diff --git a/datafusion/physical-expr/src/aggregate/average.rs
b/datafusion/physical-expr/src/aggregate/average.rs
index 59f72b6e3e..85e3e4f07a 100644
--- a/datafusion/physical-expr/src/aggregate/average.rs
+++ b/datafusion/physical-expr/src/aggregate/average.rs
@@ -65,12 +65,6 @@ impl Avg {
name: impl Into<String>,
data_type: DataType,
) -> Self {
- // the internal sum data type of avg just support FLOAT64 and Decimal
data type.
- assert!(matches!(
- data_type,
- DataType::Float64 | DataType::Decimal128(_, _) |
DataType::Decimal256(_, _)
- ));
-
let result_data_type = avg_return_type(&data_type).unwrap();
Self {