Github user hvanhovell commented on a diff in the pull request: https://github.com/apache/spark/pull/20850#discussion_r175407178 --- Diff: sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeRowWriter.java --- @@ -40,29 +37,45 @@ */ public final class UnsafeRowWriter extends UnsafeWriter { - private final BufferHolder holder; - // The offset of the global buffer where we start to write this row. - private int startingOffset; + private final UnsafeRow row; + private final int nullBitsSize; private final int fixedSize; - public UnsafeRowWriter(BufferHolder holder, int numFields) { - this.holder = holder; + public UnsafeRowWriter(UnsafeRow row, int initialBufferSize) { --- End diff -- Do we really need two `UnsafeRow` constructors? For the the top level row writer I also think it might be nice to create row internally, and just have a constructor that takes a numFields and (optionally) size argument.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org