Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/optimizer/robust_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "duckdb/planner/operator/logical_comparison_join.hpp"
#include "duckdb/planner/operator/logical_get.hpp"
#include "duckdb/planner/operator/logical_aggregate.hpp"
#include "duckdb/planner/operator/logical_cteref.hpp"
#include "duckdb/planner/expression/bound_columnref_expression.hpp"
#include "duckdb/common/types.hpp"
#include "table_manager.hpp"
Expand Down Expand Up @@ -138,6 +139,7 @@ void RobustOptimizerContextState::ExtractOperatorsRecursive(LogicalOperator &pla
case LogicalOperatorType::LOGICAL_GET:
case LogicalOperatorType::LOGICAL_EMPTY_RESULT:
case LogicalOperatorType::LOGICAL_CHUNK_GET:
case LogicalOperatorType::LOGICAL_CTE_REF:
D_PRINTF("[NODE_REG] Registering base table scan, type=%d", (int)op->type);
table_mgr.AddTableOperator(op);
return;
Expand Down Expand Up @@ -613,7 +615,7 @@ static void PhysicalDAGDFS(LogicalOperator *op, TableManager &table_mgr, RobustO
op->type == LogicalOperatorType::LOGICAL_EXPRESSION_GET ||
op->type == LogicalOperatorType::LOGICAL_DELIM_GET ||
op->type == LogicalOperatorType::LOGICAL_EMPTY_RESULT ||
op->type == LogicalOperatorType::LOGICAL_CHUNK_GET);
op->type == LogicalOperatorType::LOGICAL_CHUNK_GET || op->type == LogicalOperatorType::LOGICAL_CTE_REF);
if (is_leaf) {
auto *node = new PhysicalDAGNode(info->table_idx, info->table_op);
all_nodes.push_back(node);
Expand Down
3 changes: 2 additions & 1 deletion src/optimizer/table_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ idx_t TableManager::GetScalarTableIndex(LogicalOperator *op) {
case LogicalOperatorType::LOGICAL_PROJECTION:
case LogicalOperatorType::LOGICAL_UNION:
case LogicalOperatorType::LOGICAL_EXCEPT:
case LogicalOperatorType::LOGICAL_INTERSECT: {
case LogicalOperatorType::LOGICAL_INTERSECT:
case LogicalOperatorType::LOGICAL_CTE_REF: {
return op->GetTableIndex()[0];
}
case LogicalOperatorType::LOGICAL_FILTER: {
Expand Down
Loading