Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/8203#discussion_r37110674
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
---
@@ -1618,12 +1618,18 @@ class SQLQuerySuite extends QueryTest with
SharedSQLContext {
}
test("SPARK-9511: error with table starting with number") {
- val df = sqlContext.sparkContext.parallelize(1 to 10).map(i => (i,
i.toString))
- .toDF("num", "str")
- df.registerTempTable("1one")
-
- checkAnswer(sql("select count(num) from 1one"), Row(10))
+ withTempTable("1one") {
+ sqlContext.sparkContext.parallelize(1 to 10).map(i => (i,
i.toString))
+ .toDF("num", "str")
+ .registerTempTable("1one")
+ checkAnswer(sql("select count(num) from 1one"), Row(10))
+ }
+ }
- sqlContext.dropTempTable("1one")
+ test("SPARK-9955: correct error message for aggregate") {
+ val e = intercept[AnalysisException] {
+ sql("select key, max(value) from testData where bad_column > 1 group
by key")
--- End diff --
Can you please move this to `AnalysisErrorSuite`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]