Skip to content

Commit

Permalink
Do not use hash joins if start and end times are provided via sub-sel…
Browse files Browse the repository at this point in the history
…ect.
  • Loading branch information
kenwenzel committed Aug 16, 2024
1 parent cb4fb0c commit 9065400
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ boolean useHashJoin(TupleExpr leftArg, TupleExpr rightArg) {
}
if (rightFetch != null) {
// do not use hash join if required bindings are provided by left join argument
Set<String> leftAssured = leftArg.getAssuredBindingNames();
// in case of projections with aggregates we just use the projected binding names
Set<String> leftAssured = leftArg instanceof Projection ? leftArg.getBindingNames() :
leftArg.getAssuredBindingNames();
return ! rightFetch.getRequiredBindings().stream().anyMatch(required -> leftAssured.contains(required));
}
}
Expand Down

0 comments on commit 9065400

Please sign in to comment.