AngersZhuuuu commented on a change in pull request #30957: URL: https://github.com/apache/spark/pull/30957#discussion_r571448104
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala ########## @@ -220,6 +226,9 @@ trait BaseScriptTransformationExec extends UnaryExecNode { case CalendarIntervalType => wrapperConvertException( data => IntervalUtils.stringToInterval(UTF8String.fromString(data)), converter) + case _: ArrayType | _: MapType | _: StructType => + wrapperConvertException(data => JsonToStructs(attr.dataType, Map.empty[String, String], Review comment: > > This problem also happen in input side's Cast and StructToJson. > > Really? I think the input side does not have the issue. Why do you think so? Hmmm, I got your point. I misunderstood you point. Updated, how about current? Test with df.repartition(1) then transform. It only create JsonToStruct once for one partition. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org