Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/18875#discussion_r137227883
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonGenerator.scala
---
@@ -193,14 +213,27 @@ private[sql] class JacksonGenerator(
*
* @param row The row to convert
*/
- def write(row: InternalRow): Unit = writeObject(writeFields(row, schema,
rootFieldWriters))
+ def write(row: InternalRow): Unit = {
+ writeObject(writeFields(row, rowSchema.asInstanceOf[StructType],
rootFieldWriters))
--- End diff --
We should match `dataType` here too.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]