@@ -576,34 +576,32 @@ fn rewrite_map_for_projection(
576576 . collect ( )
577577}
578578
579- /// Generates a rewrite map for union inputs, taking UNION's schema and one of the input's schema.
580- /// These expressions can't be more complex than simple column references by definition.
581- ///
582- /// TODO: see `LogicalPlan::Union` above
583- /*
584- fn rewrite_map_for_union_input(
585- union_schema: &DFSchema,
586- input_schema: &DFSchema,
587- ) -> HashMap<Column, Option<Expr>> {
588- union_schema
589- .fields()
590- .iter()
591- .zip(input_schema.fields().iter())
592- .flat_map(|(union_field, input_field)| {
593- vec![
594- (
595- union_field.qualified_column(),
596- Some(Expr::Column(input_field.unqualified_column())),
597- ),
598- (
599- union_field.unqualified_column(),
600- Some(Expr::Column(input_field.unqualified_column())),
601- ),
602- ]
603- })
604- .collect()
605- }
606- */
579+ // /// Generates a rewrite map for union inputs, taking UNION's schema and one of the input's schema.
580+ // /// These expressions can't be more complex than simple column references by definition.
581+ // ///
582+ // /// TODO: see `LogicalPlan::Union` above
583+ // fn rewrite_map_for_union_input(
584+ // union_schema: &DFSchema,
585+ // input_schema: &DFSchema,
586+ // ) -> HashMap<Column, Option<Expr>> {
587+ // union_schema
588+ // .fields()
589+ // .iter()
590+ // .zip(input_schema.fields().iter())
591+ // .flat_map(|(union_field, input_field)| {
592+ // vec![
593+ // (
594+ // union_field.qualified_column(),
595+ // Some(Expr::Column(input_field.unqualified_column())),
596+ // ),
597+ // (
598+ // union_field.unqualified_column(),
599+ // Some(Expr::Column(input_field.unqualified_column())),
600+ // ),
601+ // ]
602+ // })
603+ // .collect()
604+ // }
607605
608606/// Recursively concatenates several filter predicates into one binary AND expression.
609607/// `predicates` must contain at least one expression.
@@ -621,24 +619,22 @@ fn concatenate_predicates(predicates: Vec<Expr>) -> Result<Expr> {
621619 ) )
622620}
623621
624- /// Recursively splits filter predicate from binary AND expressions into a flat vec of predicates.
625- ///
626- /// TODO: see `LogicalPlan::Filter` above
627- /*
628- fn split_predicates(predicate: &Expr) -> Vec<Expr> {
629- match predicate {
630- Expr::BinaryExpr {
631- left,
632- op: Operator::And,
633- right,
634- } => split_predicates(left)
635- .into_iter()
636- .chain(split_predicates(right).into_iter())
637- .collect(),
638- expr => vec![expr.clone()],
639- }
640- }
641- */
622+ // /// Recursively splits filter predicate from binary AND expressions into a flat vec of predicates.
623+ // ///
624+ // /// TODO: see `LogicalPlan::Filter` above
625+ // fn split_predicates(predicate: &Expr) -> Vec<Expr> {
626+ // match predicate {
627+ // Expr::BinaryExpr {
628+ // left,
629+ // op: Operator::And,
630+ // right,
631+ // } => split_predicates(left)
632+ // .into_iter()
633+ // .chain(split_predicates(right).into_iter())
634+ // .collect(),
635+ // expr => vec![expr.clone()],
636+ // }
637+ // }
642638
643639/// Recursively checks if the passed expr is a filter predicate that can be pushed down.
644640/// The predicate should be pushed down the plan if it can ultimately be pushed down to CubeScan.
0 commit comments