Skip to content
Prev Previous commit
Next Next commit
one more test case
  • Loading branch information
gatorsmile committed Apr 27, 2016
commit 7ccd95bde462e6e5cba93f3923df77843734425c
10 changes: 10 additions & 0 deletions sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,16 @@ class DataFrameSuite extends QueryTest with SharedSQLContext {
Nil)
}

test("except distinct - SQL compliance") {
val df_left = Seq(1, 2, 2, 3, 3, 4).toDF("id")
val df_right = Seq(1, 3).toDF("id")

checkAnswer(
df_left.except(df_right),
Row(2) :: Row(4) :: Nil
)
}

test("except - nullability") {
val nonNullableInts = Seq(Tuple1(11), Tuple1(3)).toDF()
assert(nonNullableInts.schema.forall(_.nullable == false))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: forall(!_.nullable)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Thanks!

Expand Down