Skip to content

Commit

Permalink
Throw UnsupportedOperationException for AggregateExpression1
Browse files Browse the repository at this point in the history
  • Loading branch information
sethah committed Oct 29, 2015
1 parent ff363cc commit f49ce5c
Showing 1 changed file with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,12 @@ case class StddevFunction(
}

// placeholder
case class Kurtosis(child: Expression) extends UnaryExpression with AggregateExpression {
case class Kurtosis(child: Expression) extends UnaryExpression with AggregateExpression1 {

override def newInstance(): AggregateFunction1 = {
throw new UnsupportedOperationException("AggregateExpression1 is no longer supported, " +
"please set spark.sql.useAggregate2 = true")
}

override def nullable: Boolean = false

Expand All @@ -1007,7 +1012,12 @@ case class Kurtosis(child: Expression) extends UnaryExpression with AggregateExp
}

// placeholder
case class Skewness(child: Expression) extends UnaryExpression with AggregateExpression {
case class Skewness(child: Expression) extends UnaryExpression with AggregateExpression1 {

override def newInstance(): AggregateFunction1 = {
throw new UnsupportedOperationException("AggregateExpression1 is no longer supported, " +
"please set spark.sql.useAggregate2 = true")
}

override def nullable: Boolean = false

Expand All @@ -1021,7 +1031,12 @@ case class Skewness(child: Expression) extends UnaryExpression with AggregateExp
}

// placeholder
case class Variance(child: Expression) extends UnaryExpression with AggregateExpression {
case class Variance(child: Expression) extends UnaryExpression with AggregateExpression1 {

override def newInstance(): AggregateFunction1 = {
throw new UnsupportedOperationException("AggregateExpression1 is no longer supported, " +
"please set spark.sql.useAggregate2 = true")
}

override def nullable: Boolean = false

Expand All @@ -1035,7 +1050,12 @@ case class Variance(child: Expression) extends UnaryExpression with AggregateExp
}

// placeholder
case class VariancePop(child: Expression) extends UnaryExpression with AggregateExpression {
case class VariancePop(child: Expression) extends UnaryExpression with AggregateExpression1 {

override def newInstance(): AggregateFunction1 = {
throw new UnsupportedOperationException("AggregateExpression1 is no longer supported, " +
"please set spark.sql.useAggregate2 = true")
}

override def nullable: Boolean = false

Expand All @@ -1049,7 +1069,12 @@ case class VariancePop(child: Expression) extends UnaryExpression with Aggregate
}

// placeholder
case class VarianceSamp(child: Expression) extends UnaryExpression with AggregateExpression {
case class VarianceSamp(child: Expression) extends UnaryExpression with AggregateExpression1 {

override def newInstance(): AggregateFunction1 = {
throw new UnsupportedOperationException("AggregateExpression1 is no longer supported, " +
"please set spark.sql.useAggregate2 = true")
}

override def nullable: Boolean = false

Expand Down

0 comments on commit f49ce5c

Please sign in to comment.