bhollis-dbx commented on code in PR #59283:
URL: https://github.com/apache/spark/pull/59283#discussion_r4250539450


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala:
##########
@@ -759,9 +737,212 @@ case class WithField(name: String, valExpr: Expression)
 /**
  * Drop a field by name.
  */
-case class DropField(name: String) extends StructFieldsOperation with 
LeafLike[Expression] {
-  override def apply(values: Seq[(StructField, Expression)]): 
Seq[(StructField, Expression)] =
-    values.filterNot { case (field, _) => resolver(field.name, name) }
+case class DropField(name: String) extends StructFieldsOperation with 
LeafLike[Expression]
+
+/**
+ * Updates the current value of a field without duplicating the parent struct 
expression.
+ */
+case class UpdateNestedField(name: String, fieldOps: 
Seq[StructFieldsOperation])

Review Comment:
   Fixed in 049f52ef8. Nested updates render like the legacy expanded 
operations, retaining parent-field names without reconstructing expanded trees. 
Tests compare SQL rendering and generated names, including dotted/backtick 
field names, and verify that different parents produce distinct names.
   



-- 
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]

Reply via email to