Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
AlgebraicAggregate should extend Unevaluable
  • Loading branch information
JoshRosen committed Jul 23, 2015
commit 8d9ed22fb07fcc1fcb794f843981bd933b0376ef
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ abstract class AggregateFunction2
/**
* A helper class for aggregate functions that can be implemented in terms of catalyst expressions.
*/
abstract class AlgebraicAggregate extends AggregateFunction2 with Serializable {
self: Product =>
abstract class AlgebraicAggregate extends AggregateFunction2 with Serializable with Unevaluable {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we need this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need it.

val initialValues: Seq[Expression]
val updateExpressions: Seq[Expression]
Expand Down Expand Up @@ -184,19 +183,15 @@ abstract class AlgebraicAggregate extends AggregateFunction2 with Serializable {
}
}

override def update(buffer: MutableRow, input: InternalRow): Unit = {
override final def update(buffer: MutableRow, input: InternalRow): Unit = {
throw new UnsupportedOperationException(
"AlgebraicAggregate's update should not be called directly")
}

override def merge(buffer1: MutableRow, buffer2: InternalRow): Unit = {
override final def merge(buffer1: MutableRow, buffer2: InternalRow): Unit = {
throw new UnsupportedOperationException(
"AlgebraicAggregate's merge should not be called directly")
}

override def eval(buffer: InternalRow): Any = {
throw new UnsupportedOperationException(
"AlgebraicAggregate's eval should not be called directly")
}
}