Github user marmbrus commented on a diff in the pull request:
    --- Diff: 
    @@ -1185,7 +1186,7 @@ object ReplaceDistinctWithAggregate extends 
Rule[LogicalPlan] {
     object ReplaceDeduplicateWithAggregate extends Rule[LogicalPlan] {
       def apply(plan: LogicalPlan): LogicalPlan = plan transform {
    -    case Deduplicate(keys, child, streaming) if !streaming =>
    +    case d @ Deduplicate(keys, child, _) if d.originalOutputMode != 
OutputMode.Append() =>
    --- End diff --
    existing: It's kind of odd that this decision is made in the optimizer and 
not the query planner.  I think our aggregate operator is actually worse than 
the specialized deduplication operator (since the specialized one is 
    It doesn't have to be in this PR, but we should probably move this to the 
planner eventually.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to