Skip to content

Commit dcca095

Browse files
committed
Address the comments
1 parent 4f51791 commit dcca095

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -769,14 +769,14 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
769769
}
770770
}
771771

772-
test("transformed dataset correctly solve the attributes") {
773-
val dataset = Seq(1, 2, 3).toDS()
774-
val ds1 = dataset.map(_ + 1)
775-
776-
checkDataset(ds1.as("d1").joinWith(ds1.as("d2"), $"d1.value" === $"d2.value"),
777-
(2, 2), (3, 3), (4, 4))
778-
checkDataset(ds1.as("d1").intersect(ds1.as("d2")), 2, 3, 4)
779-
checkDataset(ds1.as("d1").except(ds1.as("d2")))
772+
test("mapped dataset should resolve duplicated attributes for self join") {
773+
val ds = Seq(1, 2, 3).toDS().map(_ + 1)
774+
val ds1 = ds.as("d1")
775+
val ds2 = ds.as("d2")
776+
777+
checkDataset(ds1.joinWith(ds2, $"d1.value" === $"d2.value"), (2, 2), (3, 3), (4, 4))
778+
checkDataset(ds1.intersect(ds2), 2, 3, 4)
779+
checkDataset(ds1.except(ds1))
780780
}
781781

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

0 commit comments

Comments
 (0)