aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src
diff options
context:
space:
mode:
authorJihongMa <linlin200605@gmail.com>2015-09-12 10:17:15 -0700
committerDavies Liu <davies.liu@gmail.com>2015-09-12 10:17:15 -0700
commitf4a22808e03fa12bfe1bfc82cf713cfda7e063a9 (patch)
tree49d22700542e44203793940eb28341e8df573cd5 /sql/hive/src
parent22730ad54d681ad30e63fe910e8d89360853177d (diff)
downloadspark-f4a22808e03fa12bfe1bfc82cf713cfda7e063a9.tar.gz
spark-f4a22808e03fa12bfe1bfc82cf713cfda7e063a9.tar.bz2
spark-f4a22808e03fa12bfe1bfc82cf713cfda7e063a9.zip
[SPARK-6548] Adding stddev to DataFrame functions
Adding STDDEV support for DataFrame using 1-pass online /parallel algorithm to compute variance. Please review the code change. Author: JihongMa <linlin200605@gmail.com> Author: Jihong MA <linlin200605@gmail.com> Author: Jihong MA <jihongma@jihongs-mbp.usca.ibm.com> Author: Jihong MA <jihongma@Jihongs-MacBook-Pro.local> Closes #6297 from JihongMA/SPARK-SQL.
Diffstat (limited to 'sql/hive/src')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala35
1 files changed, 0 insertions, 35 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
index b126ec455f..a73b1bd52c 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
@@ -507,41 +507,6 @@ abstract class AggregationQuerySuite extends QueryTest with SQLTestUtils with Te
}.getMessage
assert(errorMessage.contains("implemented based on the new Aggregate Function interface"))
}
-
- // TODO: once we support Hive UDAF in the new interface,
- // we can remove the following two tests.
- withSQLConf("spark.sql.useAggregate2" -> "true") {
- val errorMessage = intercept[AnalysisException] {
- sqlContext.sql(
- """
- |SELECT
- | key,
- | mydoublesum(value + 1.5 * key),
- | stddev_samp(value)
- |FROM agg1
- |GROUP BY key
- """.stripMargin).collect()
- }.getMessage
- assert(errorMessage.contains("implemented based on the new Aggregate Function interface"))
-
- // This will fall back to the old aggregate
- val newAggregateOperators = sqlContext.sql(
- """
- |SELECT
- | key,
- | sum(value + 1.5 * key),
- | stddev_samp(value)
- |FROM agg1
- |GROUP BY key
- """.stripMargin).queryExecution.executedPlan.collect {
- case agg: aggregate.SortBasedAggregate => agg
- case agg: aggregate.TungstenAggregate => agg
- }
- val message =
- "We should fallback to the old aggregation code path if " +
- "there is any aggregate function that cannot be converted to the new interface."
- assert(newAggregateOperators.isEmpty, message)
- }
}
}