Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22226#discussion_r214843459
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
---
@@ -685,33 +679,29 @@ case class StructsToJson(
(row: Any) =>
gen.write(row.asInstanceOf[InternalRow])
getAndReset()
- case ArrayType(_: StructType, _) =>
+ case _: ArrayType =>
(arr: Any) =>
gen.write(arr.asInstanceOf[ArrayData])
getAndReset()
case _: MapType =>
(map: Any) =>
gen.write(map.asInstanceOf[MapData])
getAndReset()
- case ArrayType(_: MapType, _) =>
- (arr: Any) =>
- gen.write(arr.asInstanceOf[ArrayData])
- getAndReset()
}
}
override def dataType: DataType = StringType
override def checkInputDataTypes(): TypeCheckResult = child.dataType
match {
--- End diff --
nit: `child.dataType` -> `inputSchema`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]