You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by holdenk <gi...@git.apache.org> on 2018/06/08 17:00:38 UTC
[GitHub] spark pull request #21247: [SPARK-24190] Separating JSONOptions for read
Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21247#discussion_r194119938
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala ---
@@ -2427,4 +2427,14 @@ class JsonSuite extends QueryTest with SharedSQLContext with TestJsonData {
spark.read.option("mode", "PERMISSIVE").option("encoding", "UTF-8").json(Seq(badJson).toDS()),
Row(badJson))
}
+
+ test("SPARK-24190: restrictions for JSONOptions in read") {
+ val exception = intercept[IllegalArgumentException] {
+ spark.read
+ .option("encoding", "UTF-16")
+ .json(testFile("test-data/utf16LE.json"))
--- End diff --
super minor, but to more closely match the previous test maybe explicitly set multi-line to false explicitly.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org