Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19492#discussion_r144789703
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
---
@@ -343,6 +367,25 @@ class JacksonParser(
record: T,
createParser: (JsonFactory, T) => JsonParser,
recordLiteral: T => UTF8String): Seq[InternalRow] = {
+ parseWithArrayOfPrimitiveSupport(record, createParser, recordLiteral)
match {
+ case rows: Seq[InternalRow] => rows
+ case _: Seq[_] => throw BadRecordException(() =>
recordLiteral(record), () => None,
+ new RuntimeException("Conversion of array of primitive data is not
yet supported here."))
--- End diff --
Yes, it is internally used, but it it throws an `Exception` a user might
see it. I think that if this is not clear for internal usage we can add
comments, but the text of the exception should be meaningful to the end user
IMHO. If you have any suggestion about how to improve this message keeping it
meaningful to a user, I am happy to change it. Thanks.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]