Commit ed5e186 1 parent 1b63ab0 commit ed5e186 Copy full SHA for ed5e186
File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -273,14 +273,14 @@ struct PartitionClause {
273
273
}
274
274
275
275
OutputSchema modify_schema (OutputSchema&& output_schema) const {
276
- // TODO: Factor out checking against clause_info_.input_columns_ into separate function and call from all clauses
277
- // TODO: Consider adding (optional, lazily constructed?) unordered map from column names to data types in
278
- // output_schema to make this sort of operation more efficient
279
- schema::check<ErrorCode::E_COLUMN_DOESNT_EXIST>(
280
- output_schema. stream_descriptor_ . find_field (grouping_column_). has_value () ,
281
- " GroupByClause requires column '{}' to exist in input data " ,
282
- grouping_column_
283
- );
276
+ const auto & column_types = output_schema. column_types ();
277
+ for ( const auto & input_column: *clause_info_. input_columns_ ) {
278
+ schema::check<ErrorCode::E_COLUMN_DOESNT_EXIST>(
279
+ column_types. contains (input_column),
280
+ " GroupByClause requires column '{}' to exist in input data " ,
281
+ grouping_column_
282
+ );
283
+ }
284
284
return output_schema;
285
285
}
286
286
You can’t perform that action at this time.
0 commit comments