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

    https://github.com/apache/spark/pull/20850#discussion_r175393169
  
    --- Diff: 
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeArrayWriter.java
 ---
    @@ -47,126 +40,119 @@ private void assertIndexIsValid(int index) {
         assert index < numElements : "index (" + index + ") should < " + 
numElements;
       }
     
    -  public void initialize(BufferHolder holder, int numElements, int 
elementSize) {
    +  public UnsafeArrayWriter(UnsafeWriter writer) {
    +    super(writer.getBufferHolder());
    +  }
    +
    +  public void initialize(int numElements, int elementSize) {
    --- End diff --
    
    Should we move `elementSize` into the constructor? I don't think there are 
case where we are reusing `UnsafeArrayWriter `s.


---

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

Reply via email to