@@ -83,29 +83,29 @@ pub fn into_reduction(
8383 IRAggExpr :: AggGroups ( _) => todo ! ( ) ,
8484 } ,
8585 AExpr :: Len => {
86- if let Some ( first_column) = schema. iter_names ( ) . next ( ) {
87- let out: Box < dyn GroupedReduction > = Box :: new ( LenReduce :: default ( ) ) ;
88- let expr = expr_arena. add ( AExpr :: Column ( first_column. as_str ( ) . into ( ) ) ) ;
86+ // if let Some(first_column) = schema.iter_names().next() {
87+ // let out: Box<dyn GroupedReduction> = Box::new(LenReduce::default());
88+ // let expr = expr_arena.add(AExpr::Column(first_column.as_str().into()));
8989
90- ( out, expr)
91- } else {
92- // Support len aggregation on 0-width morsels.
93- // Notes:
94- // * We do this instead of projecting a scalar, because scalar literals don't
95- // project to the height of the DataFrame (in the PhysicalExpr impl).
96- // * This approach is not sound for `update_groups()`, but currently that case is
97- // not hit (it would need group-by -> len on empty morsels).
98- polars_ensure ! (
99- !is_aggregation_context,
100- ComputeError :
101- "not implemented: len() of groups with no columns"
102- ) ;
90+ // (out, expr)
91+ // } else {
92+ // // Support len aggregation on 0-width morsels.
93+ // // Notes:
94+ // // * We do this instead of projecting a scalar, because scalar literals don't
95+ // // project to the height of the DataFrame (in the PhysicalExpr impl).
96+ // // * This approach is not sound for `update_groups()`, but currently that case is
97+ // // not hit (it would need group-by -> len on empty morsels).
98+ // polars_ensure!(
99+ // !is_aggregation_context,
100+ // ComputeError:
101+ // "not implemented: len() of groups with no columns"
102+ // );
103103
104- let out: Box < dyn GroupedReduction > = new_sum_reduction ( DataType :: IDX_DTYPE ) ?;
105- let expr = expr_arena. add ( AExpr :: Len ) ;
104+ let out: Box < dyn GroupedReduction > = new_sum_reduction ( DataType :: IDX_DTYPE ) ?;
105+ let expr = expr_arena. add ( AExpr :: Len ) ;
106106
107- ( out, expr)
108- }
107+ ( out, expr)
108+ // }
109109 } ,
110110
111111 AExpr :: Function {
0 commit comments