You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/28 05:23:59 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #35635: [SPARK-38308][SQL] Eagerly iterate over sequence of window expressions in `ExtractWindowExpressions`

cloud-fan commented on a change in pull request #35635:
URL: https://github.com/apache/spark/pull/35635#discussion_r836062422



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -3141,7 +3141,7 @@ class Analyzer(override val catalogManager: CatalogManager)
       // have been resolved.
       case p @ Project(projectList, child)
         if hasWindowFunction(projectList) && !p.expressions.exists(!_.resolved) =>
-        val (windowExpressions, regularExpressions) = extract(projectList)
+        val (windowExpressions, regularExpressions) = extract(projectList.toIndexedSeq)

Review comment:
       Just an idea: instead of fixing the internal code here and there, shall we simply fix all the public APIs that take `Seq`, to always call `toIndexedSeq` so that the `Stream` is materialized?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org