Skip to content

Commit

Permalink
Merge branch 'main' into bump_datafusion
Browse files Browse the repository at this point in the history
  • Loading branch information
tanruixiang authored Jan 17, 2024
2 parents 300ca1e + a905863 commit 8a2b34e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions iox_query/src/logical_optimizer/handle_gapfill/range_predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ impl TreeNodeVisitor for TimeRangeVisitor {

fn pre_visit(&mut self, plan: &LogicalPlan) -> Result<VisitRecursion> {
match plan {
LogicalPlan::Projection(p) => {
let idx = p.schema.index_of_column(&self.col)?;
match unwrap_alias(&p.expr[idx]) {
Expr::Column(ref c) => {
self.col = c.clone();
Ok(VisitRecursion::Continue)
}
_ => Ok(VisitRecursion::Stop),
}
}
LogicalPlan::Filter(f) => {
let range = self.range.clone();
let range = split_conjunction(&f.predicate)
Expand All @@ -67,8 +57,12 @@ impl TreeNodeVisitor for TimeRangeVisitor {
}
// These nodes do not alter their schema, so we can recurse through them
LogicalPlan::Sort(_)
| LogicalPlan::Projection(_)
| LogicalPlan::Repartition(_)
| LogicalPlan::Limit(_)
| LogicalPlan::Explain(_)
| LogicalPlan::Analyze(_)
| LogicalPlan::Aggregate(_)
| LogicalPlan::Distinct(_) => Ok(VisitRecursion::Continue),
// At some point we may wish to handle joins here too.
_ => Ok(VisitRecursion::Stop),
Expand Down

0 comments on commit 8a2b34e

Please sign in to comment.