aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results
diff options
context:
space:
mode:
authorWenchen Fan <wenchen@databricks.com>2017-04-20 16:59:38 +0200
committerHerman van Hovell <hvanhovell@databricks.com>2017-04-20 16:59:38 +0200
commitb91873db0930c6fe885c27936e1243d5fabd03ed (patch)
tree45459b54f7e1c9b502d3e957c9fe0290a4614e06 /sql/core/src/test/resources/sql-tests/results
parentc6f62c5b8106534007df31ca8c460064b89b450b (diff)
downloadspark-b91873db0930c6fe885c27936e1243d5fabd03ed.tar.gz
spark-b91873db0930c6fe885c27936e1243d5fabd03ed.tar.bz2
spark-b91873db0930c6fe885c27936e1243d5fabd03ed.zip
[SPARK-20409][SQL] fail early if aggregate function in GROUP BY
## What changes were proposed in this pull request? It's illegal to have aggregate function in GROUP BY, and we should fail at analysis phase, if this happens. ## How was this patch tested? new regression test Author: Wenchen Fan <wenchen@databricks.com> Closes #17704 from cloud-fan/minor.
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/results')
-rw-r--r--sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out b/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out
index c0930bbde6..d03681d0ea 100644
--- a/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out
+++ b/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out
@@ -122,7 +122,7 @@ select a, b, sum(b) from data group by 3
struct<>
-- !query 11 output
org.apache.spark.sql.AnalysisException
-GROUP BY position 3 is an aggregate function, and aggregate functions are not allowed in GROUP BY; line 1 pos 39
+aggregate functions are not allowed in GROUP BY, but found sum(CAST(data.`b` AS BIGINT));
-- !query 12
@@ -131,7 +131,7 @@ select a, b, sum(b) + 2 from data group by 3
struct<>
-- !query 12 output
org.apache.spark.sql.AnalysisException
-GROUP BY position 3 is an aggregate function, and aggregate functions are not allowed in GROUP BY; line 1 pos 43
+aggregate functions are not allowed in GROUP BY, but found (sum(CAST(data.`b` AS BIGINT)) + CAST(2 AS BIGINT));
-- !query 13