Skip to content

Commit

Permalink
[SPARK-21538][SQL] Added a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi committed Jul 27, 2017
1 parent b0fbd5e commit 309cb8f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,15 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
assert(rlike3.count() == 0)
}
}

test("SPARK-21538: Attribute resolution inconsistency in Dataset API") {
val df = spark.range(1).withColumnRenamed("id", "x")
checkAnswer(df.sort(col("id")), df.sort("id"))
checkAnswer(df.sort($"id"), df.sort("id"))
checkAnswer(df.sort('id), df.sort("id"))
checkAnswer(df.orderBy('id), df.sort("id"))
checkAnswer(df.orderBy("id"), df.sort("id"))
}
}

case class WithImmutableMap(id: String, map_test: scala.collection.immutable.Map[Long, String])
Expand Down

0 comments on commit 309cb8f

Please sign in to comment.