Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5945#discussion_r29788993
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -638,11 +638,10 @@ class Analyzer(
def addWindow(windowExpressions: Seq[NamedExpression], child:
LogicalPlan): LogicalPlan = {
// First, we group window expressions based on their Window Spec.
val groupedWindowExpression = windowExpressions.groupBy { expr =>
- val windowExpression = expr.find {
- case window: WindowExpression => true
- case other => false
- }.map(_.asInstanceOf[WindowExpression].windowSpec)
- windowExpression.getOrElse(
+ val windowSpec = expr.collect {
--- End diff --
collectFirst
---
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]