cloud-fan commented on code in PR #53360:
URL: https://github.com/apache/spark/pull/53360#discussion_r2617719238
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AssignmentUtils.scala:
##########
@@ -178,11 +182,25 @@ object AssignmentUtils extends SQLConfHelper with
CastSupport {
} else if (exactAssignments.isEmpty && fieldAssignments.isEmpty) {
TableOutputResolver.checkNullability(colExpr, col, conf, colPath)
} else if (exactAssignments.nonEmpty) {
- val value = exactAssignments.head.value
- val coerceMode = if (coerceNestedTypes) RECURSE else NONE
- val resolvedValue = TableOutputResolver.resolveUpdate("", value, col,
conf, addError,
- colPath, coerceMode)
- resolvedValue
+ if (updateStar) {
+ val value = exactAssignments.head.value
+ col.dataType match {
+ case _: StructType =>
Review Comment:
so the behavior before this PR is we simply cast the source struct to the
target struct type which ignores the original values of the target struct
fields?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]