[
https://issues.apache.org/jira/browse/SPARK-54621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-54621.
---------------------------------
Fix Version/s: 4.2.0
4.1.1
Resolution: Fixed
Issue resolved by pull request 53360
[https://github.com/apache/spark/pull/53360]
> Merge Into Update Set * preserve nested fields if coerceNestedTypes is enabled
> ------------------------------------------------------------------------------
>
> Key: SPARK-54621
> URL: https://issues.apache.org/jira/browse/SPARK-54621
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 4.1.0
> Reporter: Szehon Ho
> Assignee: Szehon Ho
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.2.0, 4.1.1
>
>
> The 'struct coercion' feature for MERGE INTO (allowing it to pass if
> assigning a struct with less fields into a struct with more fields) is turned
> off in a flag in SPARK-54525, but was not removed because the community
> wanted to try it.
> [~aokolnychyi] tested the feature and thinks that even if it is behind the
> experimental flag, we should take the stance for now that UPDATE SET * should
> explode to all nested fields vs top level columns. Ie in this case, missing
> nested fields are preserved, and not overriden with null if we only explode
> it top-level columns.
> The rationale being:
> * its safer to not override values
> * Spark in general tries to treat nested fields like columns
> * there's a way for the user to override with null, in particular by
> specifying the struct explicitly, ie UPDATE SET struct = source.struct
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]