leaves12138 commented on code in PR #7976:
URL: https://github.com/apache/paimon/pull/7976#discussion_r3307898474


##########
docs/docs/spark/sql-write.md:
##########
@@ -221,6 +221,20 @@ WHEN NOT MATCHED THEN
 INSERT *      -- when not matched, insert this row without any transformation;
 ```
 
+### Column Alignment
+
+Assignments are aligned to the target by column name, and unmentioned target 
columns are filled with NULL.
+
+`INSERT *` / `UPDATE SET *` expand against the target columns:
+
+- Source columns missing from the target are rejected by default. Enable 
`spark.paimon.write.merge-schema` to keep them and evolve the table schema at 
write time (see [Write Merge Schema](#write-merge-schema)).

Review Comment:
   This section does not seem to match the implementation and the new tests. 
For top-level source-only columns under `UPDATE SET *` / `INSERT *`, strict 
mode currently drops them (for example `source extra columns silently dropped 
under star expansion (mergeSchema=false)`), while `merge-schema=true` evolves 
the target schema. Conversely, for target-only columns missing from the source, 
strict `UPDATE SET *` / `INSERT *` throws, and only merge-schema mode preserves 
the target value for `UPDATE SET *` or fills default/NULL for `INSERT *`. Could 
you adjust these bullets to describe those four cases explicitly?
   



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

Reply via email to