spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-9955][SQL] correct error message for ag...
Date Sat, 15 Aug 2015 03:26:16 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8203#discussion_r37132757
  
    --- 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 --
    
    The `UnresolvedAlias` is only introduced when parsing SQL or DataFrame, so if we move
this test into `AnalysisErrorSuite`, we need to add the `UnresolvedAliases` manually, is that
OK?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message