Github user MaxGekk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21247#discussion_r195706585
--- 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 --
Actually the exception must be thrown for both cases - per-line and
multiLine mode. I will check both mode, and both encoding `UTF-16` and `UTF-32`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]