Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16371#discussion_r94363919
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala
 ---
    @@ -88,19 +92,19 @@ abstract class Collect extends ImperativeAggregate {
     case class CollectList(
         child: Expression,
         mutableAggBufferOffset: Int = 0,
    -    inputAggBufferOffset: Int = 0) extends Collect {
    +    inputAggBufferOffset: Int = 0) extends Collect[ArrayBuffer[Any]] {
     
       def this(child: Expression) = this(child, 0, 0)
     
    -  override def withNewMutableAggBufferOffset(newMutableAggBufferOffset: 
Int): ImperativeAggregate =
    +  override def withNewMutableAggBufferOffset(newMutableAggBufferOffset: 
Int): CollectList =
         copy(mutableAggBufferOffset = newMutableAggBufferOffset)
     
       override def withNewInputAggBufferOffset(newInputAggBufferOffset: Int): 
ImperativeAggregate =
         copy(inputAggBufferOffset = newInputAggBufferOffset)
     
    -  override def prettyName: String = "collect_list"
    +  override def createAggregationBuffer(): ArrayBuffer[Any] = new 
ArrayBuffer[Any]()
     
    -  override protected[this] val buffer: mutable.ArrayBuffer[Any] = 
mutable.ArrayBuffer.empty
    --- End diff --
    
    `mutable.ArrayBuffer.empty` looks better.


---
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