Skip to content
Merged
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
13 changes: 13 additions & 0 deletions presto-docs/src/main/sphinx/admin/properties-session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,19 @@ queries that have very selective joins.

The corresponding configuration property is :ref:`admin/properties:\`\`optimizer.push-aggregation-through-join\`\``.

``push_partial_aggregation_through_join``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``boolean``
* **Default value:** ``false``

When a partial aggregation is above an inner join and all aggregation inputs come from
only one side of the join, the partial aggregation is pushed below the join to that side.
This reduces the amount of data flowing into the join operator, which can improve
performance by allowing the aggregation to pre-reduce data before the join is performed.

The corresponding configuration property is :ref:`admin/properties:\`\`optimizer.push-partial-aggregation-through-join\`\``.

``push_table_write_through_union``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
13 changes: 13 additions & 0 deletions presto-docs/src/main/sphinx/admin/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,19 @@ queries that have very selective joins.

The corresponding session property is :ref:`admin/properties-session:\`\`push_aggregation_through_join\`\``.

``optimizer.push-partial-aggregation-through-join``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``boolean``
* **Default value:** ``false``

When a partial aggregation is above an inner join and all aggregation inputs come from
only one side of the join, the partial aggregation is pushed below the join to that side.
This reduces the amount of data flowing into the join operator, which can improve
performance by allowing the aggregation to pre-reduce data before the join is performed.

The corresponding session property is :ref:`admin/properties-session:\`\`push_partial_aggregation_through_join\`\``.

``optimizer.push-table-write-through-union``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ public SystemSessionProperties(
booleanProperty(
PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN,
"Push partial aggregations below joins",
false,
featuresConfig.isPushPartialAggregationThroughJoin(),
false),
booleanProperty(
PARSE_DECIMAL_LITERALS_AS_DOUBLE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public class FeaturesConfig
private double defaultJoinSelectivityCoefficient;
private double defaultWriterReplicationCoefficient = 3;
private boolean pushAggregationThroughJoin = true;
private boolean pushPartialAggregationThroughJoin;
private boolean pushSemiJoinThroughUnion;
private boolean pushdownThroughUnnest;
private double memoryRevokingTarget = 0.5;
Expand Down Expand Up @@ -1678,6 +1679,19 @@ public FeaturesConfig setPushAggregationThroughJoin(boolean value)
return this;
}

public boolean isPushPartialAggregationThroughJoin()
{
return pushPartialAggregationThroughJoin;
}

@Config("optimizer.push-partial-aggregation-through-join")
@ConfigDescription("Push partial aggregations below joins")
public FeaturesConfig setPushPartialAggregationThroughJoin(boolean pushPartialAggregationThroughJoin)
{
this.pushPartialAggregationThroughJoin = pushPartialAggregationThroughJoin;
return this;
}

public boolean isPushSemiJoinThroughUnion()
{
return pushSemiJoinThroughUnion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void testDefaults()
.setExchangeChecksumEnabled(false)
.setEnableIntermediateAggregations(false)
.setPushAggregationThroughJoin(true)
.setPushPartialAggregationThroughJoin(false)
.setPushSemiJoinThroughUnion(false)
.setPushdownThroughUnnest(false)
.setForceSingleNodeOutput(true)
Expand Down Expand Up @@ -358,6 +359,7 @@ public void testExplicitPropertyMappings()
.put("optimizer.retry-query-with-history-based-optimization", "true")
.put("optimizer.treat-low-confidence-zero-estimation-as-unknown", "true")
.put("optimizer.push-aggregation-through-join", "false")
.put("optimizer.push-partial-aggregation-through-join", "true")
.put("optimizer.push-semi-join-through-union", "true")
.put("optimizer.pushdown-through-unnest", "true")
.put("optimizer.aggregation-partition-merging", "top_down")
Expand Down Expand Up @@ -765,6 +767,7 @@ public void testExplicitPropertyMappings()
.setSkipPushdownThroughExchangeForRemoteProjection(true)
.setUseConnectorProvidedSerializationCodecs(true)
.setRemoteFunctionNamesForFixedParallelism("remote_.*")
.setPushPartialAggregationThroughJoin(true)
.setRemoteFunctionFixedParallelismTaskCount(100);
assertFullMapping(properties, expected);
}
Expand Down
Loading