Skip to content

Commit

Permalink
Merge pull request #8866 from Light-City/fix/logic
Browse files Browse the repository at this point in the history
Issue: #8867 Fix: remove unused variables for logical_root.
  • Loading branch information
Mytherin committed Nov 8, 2023
2 parents aa62b4a + ce39c03 commit 81e84e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/include/duckdb/optimizer/rule.hpp
Expand Up @@ -23,8 +23,6 @@ class Rule {

//! The expression rewriter this rule belongs to
ExpressionRewriter &rewriter;
//! The root
unique_ptr<LogicalOperatorMatcher> logical_root;
//! The expression matcher of the rule
unique_ptr<ExpressionMatcher> root;

Expand Down
8 changes: 0 additions & 8 deletions src/optimizer/expression_rewriter.cpp
Expand Up @@ -59,16 +59,8 @@ void ExpressionRewriter::VisitOperator(LogicalOperator &op) {

to_apply_rules.clear();
for (auto &rule : rules) {
if (rule->logical_root && !rule->logical_root->Match(op.type)) {
// this rule does not apply to this type of LogicalOperator
continue;
}
to_apply_rules.push_back(*rule);
}
if (to_apply_rules.empty()) {
// no rules to apply on this node
return;
}

VisitOperatorExpressions(op);

Expand Down

0 comments on commit 81e84e5

Please sign in to comment.