Github user BryanCutler commented on a diff in the pull request:
https://github.com/apache/spark/pull/22226#discussion_r214156762
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonGenerator.scala
---
@@ -43,20 +42,22 @@ private[sql] class JacksonGenerator(
// we can directly access data in `ArrayData` without the help of
`SpecificMutableRow`.
private type ValueWriter = (SpecializedGetters, Int) => Unit
- // `JackGenerator` can only be initialized with a `StructType` or a
`MapType`.
- require(dataType.isInstanceOf[StructType] ||
dataType.isInstanceOf[MapType],
+ // `JackGenerator` can only be initialized with a `StructType`, a
`MapType` or a `ArrayType`.
+ require(dataType.isInstanceOf[StructType] ||
dataType.isInstanceOf[MapType]
+ || dataType.isInstanceOf[ArrayType],
s"JacksonGenerator only supports to be initialized with a
${StructType.simpleString} " +
--- End diff --
maybe need a `,` between `${StructType.simpleString}` and
`${MapType.simpleString}`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]