Skip to content

Commit

Permalink
Address the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryshao committed Jun 2, 2016
1 parent 4f51791 commit dcca095
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,14 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
}
}

test("transformed dataset correctly solve the attributes") {
val dataset = Seq(1, 2, 3).toDS()
val ds1 = dataset.map(_ + 1)

checkDataset(ds1.as("d1").joinWith(ds1.as("d2"), $"d1.value" === $"d2.value"),
(2, 2), (3, 3), (4, 4))
checkDataset(ds1.as("d1").intersect(ds1.as("d2")), 2, 3, 4)
checkDataset(ds1.as("d1").except(ds1.as("d2")))
test("mapped dataset should resolve duplicated attributes for self join") {
val ds = Seq(1, 2, 3).toDS().map(_ + 1)
val ds1 = ds.as("d1")
val ds2 = ds.as("d2")

checkDataset(ds1.joinWith(ds2, $"d1.value" === $"d2.value"), (2, 2), (3, 3), (4, 4))
checkDataset(ds1.intersect(ds2), 2, 3, 4)
checkDataset(ds1.except(ds1))
}

test("SPARK-15441: Dataset outer join") {
Expand Down

0 comments on commit dcca095

Please sign in to comment.