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

    https://github.com/apache/spark/pull/6911#discussion_r32972528
  
    --- Diff: 
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeFixedWidthAggregationMap.java
 ---
    @@ -142,14 +141,7 @@ public UnsafeRow getAggregationBuffer(InternalRow 
groupingKey) {
         final int groupingKeySize = 
groupingKeyToUnsafeRowConverter.getSizeRequirement(groupingKey);
         // Make sure that the buffer is large enough to hold the key. If it's 
not, grow it:
         if (groupingKeySize > groupingKeyConversionScratchSpace.length) {
    -      // This new array will be initially zero, so there's no need to zero 
it out here
           groupingKeyConversionScratchSpace = new byte[groupingKeySize];
    -    } else {
    --- End diff --
    
    I think that it's safe to remove this zeroing as long as we assume that a) 
every column will actually end up writing to the row, and b) for null columns, 
we zero out the fixed length section, and c) we zero the bitset when starting 
to write the row.  All three of these assumptions seem to hold, so this seems 
fine.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to