mingmwang commented on code in PR #6657:
URL: https://github.com/apache/arrow-datafusion/pull/6657#discussion_r1230261924
##########
datafusion/physical-expr/src/aggregate/row_accumulator.rs:
##########
@@ -81,19 +95,321 @@ pub trait RowAccumulator: Send + Sync + Debug {
/// Returns if `data_type` is supported with `RowAccumulator`
pub fn is_row_accumulator_support_dtype(data_type: &DataType) -> bool {
- matches!(
- data_type,
- DataType::Boolean
- | DataType::UInt8
- | DataType::UInt16
- | DataType::UInt32
- | DataType::UInt64
- | DataType::Int8
- | DataType::Int16
- | DataType::Int32
- | DataType::Int64
- | DataType::Float32
- | DataType::Float64
- | DataType::Decimal128(_, _)
- )
+ matches_all_supported_data_types!(data_type)
+}
+
+/// Enum to dispatch the RowAccumulator, RowAccumulator contains generic
methods and can not be used as the trait objects
+pub enum RowAccumulatorItem {
Review Comment:
I think we can still use the `Trait` to define a common interface for all
the row accumulators, we just can not use the trait objects anymore.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]