Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19916#discussion_r155513053
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/SortSuite.scala ---
    @@ -119,4 +120,20 @@ class SortSuite extends SparkPlanTest with 
SharedSQLContext {
           )
         }
       }
    +
    +  test("SPARK-22716: SortExec should not use a global variable to 
reference to itself") {
    +    val ctx = new CodegenContext
    +    val df = Seq(("a", 1)).toDF("a", "b").sort("a")
    +    val plan = df.queryExecution.executedPlan
    +    val sortExec = plan.children.head.asInstanceOf[SortExec]
    +    sortExec.produce(ctx, plan.asInstanceOf[CodegenSupport])
    +    // we expect 8 global variables:
    --- End diff --
    
    This test and that one in `BroadcastJoinSuite` seems a bit overkill.


---

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

Reply via email to