Skip to content

Commit

Permalink
Revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kryonix committed Sep 23, 2024
1 parent 7da48a1 commit ff9810f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions src/include/duckdb/planner/binder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class Binder : public enable_shared_from_this<Binder> {
optional_ptr<vector<DummyBinding>> lambda_bindings;

unordered_map<idx_t, LogicalOperator *> recursive_ctes;
unordered_map<idx_t, BoundQueryNode *> bound_cte_nodes;

public:
DUCKDB_API BoundStatement Bind(SQLStatement &statement);
Expand Down Expand Up @@ -211,10 +210,6 @@ class Binder : public enable_shared_from_this<Binder> {

StatementProperties &GetStatementProperties();

shared_ptr<Binder> GetParentBinder() {
return parent;
}

private:
//! The parent binder (if any)
shared_ptr<Binder> parent;
Expand Down
2 changes: 0 additions & 2 deletions src/planner/binder/query_node/bind_cte_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ unique_ptr<BoundCTENode> Binder::BindCTE(CTENode &statement) {
result->ctename = statement.ctename;
result->setop_index = GenerateTableIndex();

bound_cte_nodes[result->setop_index] = result.get();

result->query_binder = Binder::CreateBinder(context, this);
result->query = result->query_binder->BindNode(*statement.query);

Expand Down
2 changes: 0 additions & 2 deletions src/planner/binder/query_node/bind_recursive_cte_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ unique_ptr<BoundQueryNode> Binder::BindNode(RecursiveCTENode &statement) {
result->union_all = statement.union_all;
result->setop_index = GenerateTableIndex();

bound_cte_nodes[result->setop_index] = result.get();

result->left_binder = Binder::CreateBinder(context, this);
result->left = result->left_binder->BindNode(*statement.left);

Expand Down
3 changes: 0 additions & 3 deletions src/planner/binder/tableref/bind_basetableref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "duckdb/planner/operator/logical_get.hpp"
#include "duckdb/planner/tableref/bound_basetableref.hpp"
#include "duckdb/planner/tableref/bound_cteref.hpp"
#include "duckdb/planner/query_node/bound_recursive_cte_node.hpp"
#include "duckdb/planner/query_node/bound_cte_node.hpp"
#include "duckdb/planner/tableref/bound_dummytableref.hpp"
#include "duckdb/planner/tableref/bound_subqueryref.hpp"

Expand Down Expand Up @@ -122,7 +120,6 @@ unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {

result->types = ctebinding->types;
result->bound_columns = std::move(names);

return std::move(result);
} else {
if (CTEIsAlreadyBound(cte)) {
Expand Down
3 changes: 0 additions & 3 deletions src/planner/subquery/flatten_dependent_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
base_binding.table_index = proj.table_index;
this->delim_offset = base_binding.column_index = plan->expressions.size() - correlated_columns.size();
this->data_offset = 0;

return plan;
}
case LogicalOperatorType::LOGICAL_AGGREGATE_AND_GROUP_BY: {
Expand Down Expand Up @@ -432,7 +431,6 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
// push the child into the LHS
plan->children[0] = PushDownDependentJoinInternal(std::move(plan->children[0]),
parent_propagate_null_values, lateral_depth);

// rewrite expressions in the join conditions
RewriteCorrelatedExpressions rewriter(base_binding, correlated_map, lateral_depth);
rewriter.VisitOperator(*plan);
Expand Down Expand Up @@ -481,7 +479,6 @@ unique_ptr<LogicalOperator> FlattenDependentJoins::PushDownDependentJoinInternal
logical_any_join.condition = std::move(conjunction);
}
}

// then we replace any correlated expressions with the corresponding entry in the correlated_map
RewriteCorrelatedExpressions rewriter(right_binding, correlated_map, lateral_depth);
rewriter.VisitOperator(*plan);
Expand Down

0 comments on commit ff9810f

Please sign in to comment.