ankurdave commented on a change in pull request #30160:
URL: https://github.com/apache/spark/pull/30160#discussion_r512940190



##########
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:
       I agree. From a quick survey (`git grep -i -e map --and -e genCode`), a 
number of call sites seem vulnerable to the same bug.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to