fn schema_for_aggregate_column_names(
        &self,
        columns: &[(ColumnName<'_>, AggregateType)],
    ) -> Vec<(crate::schema::ColumnType, AggregateType, LogicalDataType)> {
        columns
            .iter()
            .map(|(name, agg_type)| {
                let schema = self.columns.get(*name).unwrap();

                // TODO(edd): this check happens because an aggregate does
                // not have to have the same physical type as the logical
                // type of the column it is aggregating on. An example of
                // this is Count. I'm going to fix this by associated data
                // types with the aggregate itself.
                let physical_data_type = if let AggregateType::Count = agg_type {
                    LogicalDataType::Unsigned
                } else {
                    schema.logical_data_type
                };

                (schema.typ.clone(), *agg_type, physical_data_type)
            })
            .collect::<Vec<_>>()
    }
// Extract the schema information for a set of aggregate columns
Extract the schema information for a set of aggregate columns
Extract the schema information for a set of aggregate columns
fn schema_for_aggregate_column_names(
        &self,
        columns: &[(ColumnName<'_>, AggregateType)],
    ) -> Vec<(crate::schema::ColumnType, AggregateType, LogicalDataType)> {
        columns
            .iter()
            .map(|(name, agg_type)| {
                let schema = self.columns.get(*name).unwrap();
                // TODO(edd): this check happens because an aggregate does
                // not have to have the same physical type as the logical
                // type of the column it is aggregating on. An example of
                // this is Count. I'm going to fix this by associated data
                // types with the aggregate itself.
                let physical_data_type = if let AggregateType::Count = agg_type {
                    LogicalDataType::Unsigned
                } else {
                    schema.logical_data_type
                };
                (schema.typ.clone(), *agg_type, physical_data_type)
            })
            .collect::<Vec<_>>()
    }
fn schema_for_aggregate_column_names ( & self , columns : & [ ( ColumnName < ' _ > , AggregateType ) ] , ) -> Vec < ( crate :: schema :: ColumnType , AggregateType , LogicalDataType ) > { columns . iter ( ) . map ( | ( name , agg_type ) | { let schema = self . columns . get ( * name ) . unwrap ( ) ; // TODO(edd): this check happens because an aggregate does // not have to have the same physical type as the logical // type of the column it is aggregating on. An example of // this is Count. I'm going to fix this by associated data // types with the aggregate itself. let physical_data_type = if let AggregateType :: Count = agg_type { LogicalDataType :: Unsigned } else { schema . logical_data_type } ; ( schema . typ . clone ( ) , * agg_type , physical_data_type ) } ) . collect :: < Vec < _ > > ( ) }
Extract the schema information for a set of aggregate columns
Extract the schema information for a set of aggregate columns
&self
columns
&[(ColumnName<'_>, AggregateType)]
&self
columns
&[(ColumnName<'_>, AggregateType)]