Tathagata Das created SPARK-34962:
-------------------------------------
Summary: Explicit representation of star in MergeIntoTable's
Update and Insert action
Key: SPARK-34962
URL: https://issues.apache.org/jira/browse/SPARK-34962
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 3.1.1
Reporter: Tathagata Das
Assignee: Tathagata Das
Currently, UpdateAction and InsertAction in the MergeIntoTable implicitly
represent `update set *` and `insert *` with empty assignments. That means
there is no way to differentiate between the representations of "update all
columns" and "update no columns". For SQL MERGE queries, this inability does
not matter because the SQL MERGE grammar that generated the MergeIntoTable plan
does not allow "update no columns". However, other ways of generating the
MergeIntoTable plan may not have that limitation, and may want to allow
specifying "update no columns". For example, in the Delta Lake project we
provide a type-safe Scala API for Merge, where it is perfectly valid to produce
a Merge query with an update clause but no update assignments. Currently, we
cannot use MergeIntoTable to represent this plan, thus complicating the
generation, and resolution of merge query from scala API.
This should be fixed by having an explicit representation of * in the
UpdateAction and InsertAction.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]