AngersZhuuuu commented on a change in pull request #30957:
URL: https://github.com/apache/spark/pull/30957#discussion_r570793559
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala
##########
@@ -47,7 +47,13 @@ trait BaseScriptTransformationExec extends UnaryExecNode {
def ioschema: ScriptTransformationIOSchema
protected lazy val inputExpressionsWithoutSerde: Seq[Expression] = {
- input.map(Cast(_, StringType).withTimeZone(conf.sessionLocalTimeZone))
+ input.map { in =>
+ in.dataType match {
+ case _: ArrayType | _: MapType | _: StructType =>
+ new StructsToJson(in).withTimeZone(conf.sessionLocalTimeZone)
Review comment:
> Is it okay to follow the default behaviour w/o `options`?
I am not so familiar about this part's properties. (I am checking these
properties)
Just a quick thought, how about we add `inputSerdeProps` as `StructTJson`'s
properties and add `outputSerdeProps` as `JsonToStruct` 's perperties.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]