Skip to content

Commit

Permalink
update fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhseh committed May 14, 2024
1 parent 5460f17 commit d54d95d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
15 changes: 12 additions & 3 deletions src/frontend/src/optimizer/plan_node/logical_cte_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,28 @@ impl PredicatePushdown for LogicalCteRef {

impl ToBatch for LogicalCteRef {
fn to_batch(&self) -> Result<PlanRef> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for to_batch of LogicalCteRef")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for to_batch of LogicalCteRef"
)
}
}

impl ToStream for LogicalCteRef {
fn to_stream(&self, _ctx: &mut ToStreamContext) -> Result<PlanRef> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for to_stream of LogicalCteRef")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for to_stream of LogicalCteRef"
)
}

fn logical_rewrite_for_stream(
&self,
_ctx: &mut RewriteStreamContext,
) -> Result<(PlanRef, ColIndexMapping)> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for logical_rewrite_for_stream of LogicalCteRef")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for logical_rewrite_for_stream of LogicalCteRef"
)
}
}
22 changes: 17 additions & 5 deletions src/frontend/src/optimizer/plan_node/logical_recursive_union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ use super::expr_visitable::ExprVisitable;
use super::generic::GenericPlanRef;
use super::utils::{childless_record, Distill};
use super::{
generic, ColPrunable, ColumnPruningContext, ExprRewritable, Logical, PlanBase, PlanTreeNode, PredicatePushdown, PredicatePushdownContext, RewriteStreamContext, ToBatch, ToStream, ToStreamContext
generic, ColPrunable, ColumnPruningContext, ExprRewritable, Logical, PlanBase, PlanTreeNode,
PredicatePushdown, PredicatePushdownContext, RewriteStreamContext, ToBatch, ToStream,
ToStreamContext,
};
use crate::binder::ShareId;
use crate::error::Result;
Expand Down Expand Up @@ -98,7 +100,8 @@ impl PredicatePushdown for LogicalRecursiveUnion {
predicate: Condition,
ctx: &mut PredicatePushdownContext,
) -> PlanRef {
let new_inputs = self.inputs()
let new_inputs = self
.inputs()
.iter()
.map(|input| input.predicate_pushdown(predicate.clone(), ctx))
.collect_vec();
Expand All @@ -111,19 +114,28 @@ impl PredicatePushdown for LogicalRecursiveUnion {

impl ToBatch for LogicalRecursiveUnion {
fn to_batch(&self) -> Result<PlanRef> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for to_batch of LogicalRecursiveUnion")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for to_batch of LogicalRecursiveUnion"
)
}
}

impl ToStream for LogicalRecursiveUnion {
fn to_stream(&self, _ctx: &mut ToStreamContext) -> Result<PlanRef> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for to_stream of LogicalRecursiveUnion")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for to_stream of LogicalRecursiveUnion"
)
}

fn logical_rewrite_for_stream(
&self,
_ctx: &mut RewriteStreamContext,
) -> Result<(PlanRef, ColIndexMapping)> {
bail_not_implemented!(issue = 15135, "recursive CTE not supported for logical_rewrite_for_stream of LogicalRecursiveUnion")
bail_not_implemented!(
issue = 15135,
"recursive CTE not supported for logical_rewrite_for_stream of LogicalRecursiveUnion"
)
}
}

0 comments on commit d54d95d

Please sign in to comment.