Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/8231#discussion_r37498127
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -466,9 +468,9 @@ class Analyzer(
// Find aggregate expressions and evaluate them early, since they
can't be evaluated in a
// Sort.
val (withAggsRemoved, aliasedAggregateList) = newOrdering.map {
- case aggOrdering if aggOrdering.collect { case a:
AggregateExpression => a }.nonEmpty =>
+ case aggOrdering if
aggOrdering.find(_.isInstanceOf[AggregateExpression]).isDefined =>
val aliased = Alias(aggOrdering.child, "_aggOrdering")()
- (aggOrdering.copy(child = aliased.toAttribute), Some(aliased))
+ (aggOrdering.copy(child =
UnresolvedReference(aliased.exprId)), Some(aliased))
--- End diff --
I'm not sure how to solve it by adding a `resolvable` field to `Attribute`,
maybe I missed something here?
---
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]