Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19800#discussion_r152798521
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala
 ---
    @@ -72,6 +72,7 @@ object GenerateOrdering extends 
CodeGenerator[Seq[SortOrder], Ordering[InternalR
        * Generates the code for ordering based on the given order.
        */
       def genComparisons(ctx: CodegenContext, ordering: Seq[SortOrder]): 
String = {
    +    val oldInputRow = ctx.INPUT_ROW
         val comparisons = ordering.map { order =>
           val oldCurrentVars = ctx.currentVars
    --- End diff --
    
    seems we can also move this our of the loop.


---

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

Reply via email to