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 2020/10/27 14:44:49 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #30160: [SPARK-33260][SQL] Fix incorrect results from SortExec when sortOrder is Stream

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala
##########
@@ -71,7 +71,13 @@ object GenerateOrdering extends CodeGenerator[Seq[SortOrder], BaseOrdering] with
     ctx.INPUT_ROW = row
     // to use INPUT_ROW we must make sure currentVars is null
     ctx.currentVars = null
-    ordering.map(_.child.genCode(ctx))
+    ordering.map(_.child.genCode(ctx)) match {
+      case stream: Stream[ExprCode] =>

Review comment:
       This is not the first time that we are bitten by `Stream`, maybe we should use `IndexedSeq` instead of `Seq` in codegen APIs. cc @rednaxelafx @viirya @maropu @kiszk 




----------------------------------------------------------------
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.

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