Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Aug 18, 2014
1 parent 213ada8 commit bd08239
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ case class CollectHashSet(expressions: Seq[Expression]) extends AggregateExpress
case class CollectHashSetFunction(
@transient expr: Seq[Expression],
@transient base: AggregateExpression)
extends MergableAggregateFunction {
extends AggregateFunction {

def this() = this(null, null) // Required for serialization.

Expand All @@ -203,13 +203,14 @@ case class CollectHashSetFunction(
@transient
val distinctValue = new InterpretedProjection(expr)

/*
override def merge(other: MergableAggregateFunction): MergableAggregateFunction = {
val otherSetIterator = other.asInstanceOf[CountDistinctFunction].seen.iterator
while(otherSetIterator.hasNext) {
seen.add(otherSetIterator.next())
}
this
}
}*/

override def update(input: Row): Unit = {
val evaluatedExpr = distinctValue(input)
Expand Down Expand Up @@ -466,7 +467,7 @@ case class SumDistinctFunction(expr: Expression, base: AggregateExpression)
case class CountDistinctFunction(
@transient expr: Seq[Expression],
@transient base: AggregateExpression)
extends MergableAggregateFunction {
extends AggregateFunction {

def this() = this(null, null) // Required for serialization.

Expand Down

0 comments on commit bd08239

Please sign in to comment.