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

    https://github.com/apache/spark/pull/19803#discussion_r152899229
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -108,20 +108,22 @@ trait CodegenSupport extends SparkPlan {
     
       /**
        * Consume the generated columns or row from current SparkPlan, call its 
parent's `doConsume()`.
    +   *
    +   * Note that `outputVars` and `row` can't both be null.
        */
       final def consume(ctx: CodegenContext, outputVars: Seq[ExprCode], row: 
String = null): String = {
         val inputVars =
    -      if (row != null) {
    +      if (outputVars != null) {
    +        assert(outputVars.length == output.length)
    --- End diff --
    
    Is it better to add `assert(row == null)` to ensure your comment below?


---

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

Reply via email to