Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/12974#discussion_r62786239
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala ---
@@ -44,10 +44,12 @@ class PlannerSuite extends SharedSQLContext {
fail(s"Could query play aggregation query $query. Is it an
aggregation query?"))
val aggregations = planned.collect { case n if n.nodeName contains
"Aggregate" => n }
- // For the new aggregation code path, there will be four aggregate
operator for
- // distinct aggregations.
+ // For the new aggregation code path, there will be three aggregate
operator for
+ // distinct aggregations. There used to be four aggregate operators
because single
+ // distinct aggregate used to trigger DistinctAggregationRewriter
rewrite. Now the
+ // the rewrite only happens when there are multiple distinct
aggregations.
assert(
- aggregations.size == 2 || aggregations.size == 4,
+ aggregations.size == 2 || aggregations.size == 3,
--- End diff --
why this change? This PR just moves the rewrite rule to the beginning of
optimizer rule right?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]