case classCollectLimitedList(child: Expression, mutableAggBufferOffset: Int = 0, inputAggBufferOffset: Int = 0, howMuchToTake: Int = 10) extends LimitedCollect[ArrayBuffer[Any]] with Product with Serializable
*
*
This code is copied from CollectList, just modified the method it extends
Copied originally from https://github.com/apache/spark/blob/branch-2.3/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala
abstract classExtramumValueByKey extends DeclarativeAggregate with ExpectsInputTypes
abstract classLimitedCollect[T <: Growable[Any] with Iterable[Any]] extends Collect[T] with Serializable
*
*
This modifies the collect list / set to keep only howMuchToTake random elements
*
This code is copied from CollectList, just modified the method it extends Copied originally from https://github.com/apache/spark/blob/branch-2.3/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala