xianyinxin commented on a change in pull request #25626: [SPARK-28892][SQL] Add UPDATE support for DataSource V2 URL: https://github.com/apache/spark/pull/25626#discussion_r320605605
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ########## @@ -574,6 +574,15 @@ case class DeleteFromTable( override def children: Seq[LogicalPlan] = child :: Nil } +case class UpdateTable( + child: LogicalPlan, + attrs: Seq[Attribute], Review comment: `Seq[NamedExpression]` is ok for me, and I updated the code. But `Seq[NamedExpression]` is not a perfect solution, as some nested field does not have a name, which would be resolved to something like `GetStructField`, and it is a subclass of `Expression`. Updating a nested field is complex. For a named field user can update it by specifying the name, but for an array, or a more complex json which composed by nested objects and arrays, it's hard to specify the field to be updated. So currrently, my think is we can limit the updating to the scope of non-nested field, which can be resolved to a `NamedExpression`. What's your opnion? @cloud-fan ---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
