Skip to content

Commit

Permalink
Add check for Aggregation's hash symbol in a rule
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiafi authored and findepi committed Feb 14, 2020
1 parent 5fc445a commit 6a29cf9
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -44,6 +44,7 @@
import java.util.Optional;
import java.util.Set;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static io.prestosql.SystemSessionProperties.shouldPushAggregationThroughJoin;
Expand Down Expand Up @@ -117,6 +118,9 @@ public boolean isEnabled(Session session)
@Override
public Result apply(AggregationNode aggregation, Captures captures, Context context)
{
// This rule doesn't deal with AggregationNode's hash symbol. Hash symbols are not yet present at this stage of optimization.
checkArgument(!aggregation.getHashSymbol().isPresent(), "unexpected hash symbol");

JoinNode join = captures.get(JOIN);

if (join.getFilter().isPresent()
Expand Down

0 comments on commit 6a29cf9

Please sign in to comment.