Skip to content

Commit

Permalink
Fixes in tests (that assert the incorrect error messages!)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklaskowski committed Jan 22, 2018
1 parent 2d5f07d commit 78c5ef5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ SELECT t1.x.y.* FROM t1
struct<>
-- !query 22 output
org.apache.spark.sql.AnalysisException
cannot resolve 't1.x.y.*' give input columns 'i1';
cannot resolve 't1.x.y.*' given input columns 'i1';


-- !query 23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ SELECT global_temp.view1.* FROM global_temp.view1
struct<>
-- !query 10 output
org.apache.spark.sql.AnalysisException
cannot resolve 'global_temp.view1.*' give input columns 'i1';
cannot resolve 'global_temp.view1.*' given input columns 'i1';


-- !query 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ SELECT mydb1.t1.* FROM mydb1.t1
struct<>
-- !query 21 output
org.apache.spark.sql.AnalysisException
cannot resolve 'mydb1.t1.*' give input columns 'i1';
cannot resolve 'mydb1.t1.*' given input columns 'i1';


-- !query 22
Expand Down Expand Up @@ -212,7 +212,7 @@ SELECT mydb1.t1.* FROM mydb1.t1
struct<>
-- !query 25 output
org.apache.spark.sql.AnalysisException
cannot resolve 'mydb1.t1.*' give input columns 'i1';
cannot resolve 'mydb1.t1.*' given input columns 'i1';


-- !query 26
Expand Down Expand Up @@ -420,7 +420,7 @@ SELECT mydb1.t5.* FROM mydb1.t5
struct<>
-- !query 50 output
org.apache.spark.sql.AnalysisException
cannot resolve 'mydb1.t5.*' give input columns 'i1, t5';
cannot resolve 'mydb1.t5.*' given input columns 'i1, t5';


-- !query 51
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1896,12 +1896,12 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
var e = intercept[AnalysisException] {
sql("SELECT a.* FROM temp_table_no_cols a")
}.getMessage
assert(e.contains("cannot resolve 'a.*' give input columns ''"))
assert(e.contains("cannot resolve 'a.*' given input columns ''"))

e = intercept[AnalysisException] {
dfNoCols.select($"b.*")
}.getMessage
assert(e.contains("cannot resolve 'b.*' give input columns ''"))
assert(e.contains("cannot resolve 'b.*' given input columns ''"))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
}.getMessage
assert(e.contains("The depth of view `default`.`view0` exceeds the maximum view " +
"resolution depth (10). Analysis is aborted to avoid errors. Increase the value " +
"of spark.sql.view.maxNestedViewDepth to work aroud this."))
"of spark.sql.view.maxNestedViewDepth to work around this."))
}

val e = intercept[IllegalArgumentException] {
Expand Down

0 comments on commit 78c5ef5

Please sign in to comment.