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: [email protected]
For additional commands, e-mail: [email protected]