Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/20850#discussion_r178477937
--- 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 --
I think that
[here](https://github.com/apache/spark/pull/20850/files#diff-90b107e5c61791e17d5b4b25021b89fdR349)
is only a place where we call `getRow()` without calling `setTotalSize()` if
`numVarLenFields == 0`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]