Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22226#discussion_r214842392
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
---
@@ -663,12 +662,7 @@ case class StructsToJson(
rowSchema, writer, new JSONOptions(options, timeZoneId.get))
@transient
- lazy val rowSchema = child.dataType match {
- case st: StructType => st
- case ArrayType(st: StructType, _) => st
- case mt: MapType => mt
- case ArrayType(mt: MapType, _) => mt
- }
+ lazy val rowSchema = child.dataType
--- End diff --
nit: `rowSchema` -> `intputSchema`. I named this to `rowSchema` because it
was always the schema for the row itself. Now, it seems can be other types as
well.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]