Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exploding Delim Joins #9564

Merged
merged 4 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
do not allow queries to reorder delim gets
  • Loading branch information
Tmonster committed Nov 6, 2023
commit e86abbe94c9ee13f56df92faf1fec796bb3d1f1b
13 changes: 9 additions & 4 deletions src/optimizer/join_order/relation_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ bool RelationManager::ExtractJoinRelations(LogicalOperator &input_op,
// Adding relations to the current join order optimizer
bool can_reorder_left = ExtractJoinRelations(*op->children[0], filter_operators, op);
bool can_reorder_right = ExtractJoinRelations(*op->children[1], filter_operators, op);
if (!can_reorder_right) {
// optimize left
// return false;
}
return can_reorder_left && can_reorder_right;
}
case LogicalOperatorType::LOGICAL_DUMMY_SCAN: {
Expand Down Expand Up @@ -231,10 +235,11 @@ bool RelationManager::ExtractJoinRelations(LogicalOperator &input_op,
return true;
}
case LogicalOperatorType::LOGICAL_DELIM_GET: {
auto &delim_get = op->Cast<LogicalDelimGet>();
auto stats = RelationStatisticsHelper::ExtractDelimGetStats(delim_get, context);
AddRelation(input_op, parent, stats);
return true;
// Removed until we can extract better stats from delim gets. See #596
// auto &delim_get = op->Cast<LogicalDelimGet>();
// auto stats = RelationStatisticsHelper::ExtractDelimGetStats(delim_get, context);
// AddRelation(input_op, parent, stats);
return false;
}
case LogicalOperatorType::LOGICAL_PROJECTION: {
auto child_stats = RelationStats();
Expand Down
8 changes: 8 additions & 0 deletions test/optimizer/joins/delim_join_dont_explode.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# name: test/optimizer/joins/delim_join_dont_explode.test
# description: In the join order optimizer queries need to have the correct bindings
# group: [joins]


# disable deliminator

# run query with delim gets