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

    https://github.com/apache/spark/pull/20850#discussion_r178469520
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/GenerateColumnAccessor.scala
 ---
    @@ -212,11 +210,11 @@ object GenerateColumnAccessor extends 
CodeGenerator[Seq[DataType], ColumnarItera
     
             public InternalRow next() {
               currentRow += 1;
    -          bufferHolder.reset();
    +          rowWriter.reset();
               rowWriter.zeroOutNullBytes();
               ${extractorCalls}
    -          unsafeRow.setTotalSize(bufferHolder.totalSize());
    -          return unsafeRow;
    +          rowWriter.setTotalSize();
    +          return rowWriter.getRow();
    --- End diff --
    
    Is there any place where we call `getRow()` without calling 
`setTotalSize()` before that? If there aren't then I'd combine the two.


---

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

Reply via email to