comphead commented on code in PR #12620: URL: https://github.com/apache/datafusion/pull/12620#discussion_r1775604205
########## datafusion/physical-plan/src/aggregates/group_values/column_wise.rs: ########## @@ -78,6 +79,38 @@ impl GroupValuesColumn { random_state: Default::default(), }) } + + /// Returns true if [`GroupValuesColumn`] supports for the specified schema + pub fn supported_schema(schema: &Schema) -> bool { + schema + .fields() + .iter() + .map(|f| f.data_type()) + .all(Self::supported_type) + } + + /// Returns true if the specified data type is supported by [`GroupValuesColumn`] + fn supported_type(data_type: &DataType) -> bool { + matches!( + *data_type, + DataType::Int8 Review Comment: should we use `DataType::is_signed_integer` `DataType::is_unsigned_integer` we can also use `is_numeric` but it includes Decimals -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org