Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/16289#discussion_r92545873
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationChecker.scala
---
@@ -95,6 +96,15 @@ object UnsupportedOperationChecker {
// Operations that cannot exists anywhere in a streaming plan
subPlan match {
+ case Aggregate(_, aggregateExpressions, child) =>
+ val distinctAggExprs = aggregateExpressions.flatMap { expr =>
+ expr.collect { case ae: AggregateExpression if ae.isDistinct
=> ae }
+ }
+ throwErrorIf(
+ child.isStreaming && distinctAggExprs.nonEmpty,
+ "Distinct aggregations are not supported on streaming
DataFrames/Datasets, unless" +
--- End diff --
you need an extra space here. I'd also recommend users using approximate
distinct.
---
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]