Skip to content

Commit

Permalink
Update DataFrameSuite.scala
Browse files Browse the repository at this point in the history
Incorporated review comments, Make the code more concise
  • Loading branch information
jayadevanmurali committed Feb 8, 2016
1 parent a9e3b32 commit d576496
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1293,10 +1293,7 @@ class DataFrameSuite extends QueryTest with SharedSQLContext {
}

test("SPARK-12982: Add table name validation in temp table registration") {
val rows = List(Row("foo"), Row("bar"))
val schema = StructType(Seq(StructField("col", StringType)))
val rdd = sparkContext.parallelize(rows)
val df = sqlContext.createDataFrame(rdd, schema)
val df = Seq("foo", "bar").map(Tuple1.apply).toDF("col")
//invalid table name test as below
intercept[AnalysisException](df.registerTempTable("t~"))
//valid table name test as below
Expand Down

0 comments on commit d576496

Please sign in to comment.