[SPARK-17182][SQL] Mark Collect as non-deterministic
## What changes were proposed in this pull request? This PR marks the abstract class `Collect` as non-deterministic since the results of `CollectList` and `CollectSet` depend on the actual order of input rows. ## How was this patch tested? Existing test cases should be enough. Author: Cheng Lian <lian@databricks.com> Closes #14749 from liancheng/spark-17182-non-deterministic-collect.
This commit is contained in:
parent
920806ab27
commit
2cdd92a7cd
|
@ -54,6 +54,10 @@ abstract class Collect extends ImperativeAggregate {
|
|||
|
||||
override def inputAggBufferAttributes: Seq[AttributeReference] = Nil
|
||||
|
||||
// Both `CollectList` and `CollectSet` are non-deterministic since their results depend on the
|
||||
// actual order of input rows.
|
||||
override def deterministic: Boolean = false
|
||||
|
||||
protected[this] val buffer: Growable[Any] with Iterable[Any]
|
||||
|
||||
override def initialize(b: MutableRow): Unit = {
|
||||
|
|
Loading…
Reference in a new issue