Skip to content

Commit

Permalink
[native] Do not add extra LocalExchange for native queries with join …
Browse files Browse the repository at this point in the history
…spill enabled

Unlike Java workers, native workers do not have any special requirements on the
plan share when join spill is enabled. At the same, it is confusing that query
plan changes based on whether join spilling is enabled or not.

For reference, here is a commit that added extra LocalExchange for Java workers:
ba98c10#diff-0d1dbdeb9958c20dabf2907e354679fdc10db52c4010f0e5d7fe38cbaa4872ee
  • Loading branch information
mbasmanova committed Mar 11, 2024
1 parent a276850 commit c1f0066
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import static com.facebook.presto.SystemSessionProperties.isDistributedSortEnabled;
import static com.facebook.presto.SystemSessionProperties.isEnforceFixedDistributionForOutputOperator;
import static com.facebook.presto.SystemSessionProperties.isJoinSpillingEnabled;
import static com.facebook.presto.SystemSessionProperties.isNativeExecutionEnabled;
import static com.facebook.presto.SystemSessionProperties.isQuickDistinctLimitEnabled;
import static com.facebook.presto.SystemSessionProperties.isSegmentedAggregationEnabled;
import static com.facebook.presto.SystemSessionProperties.isSpillEnabled;
Expand Down Expand Up @@ -762,7 +763,7 @@ public PlanWithProperties visitUnion(UnionNode node, StreamPreferredProperties p
public PlanWithProperties visitJoin(JoinNode node, StreamPreferredProperties parentPreferences)
{
PlanWithProperties probe;
if (isSpillEnabled(session) && isJoinSpillingEnabled(session)) {
if (isSpillEnabled(session) && isJoinSpillingEnabled(session) && !isNativeExecutionEnabled(session)) {
probe = planAndEnforce(
node.getLeft(),
fixedParallelism(),
Expand Down

0 comments on commit c1f0066

Please sign in to comment.