dongjoon-hyun commented on code in PR #55518:
URL: https://github.com/apache/spark/pull/55518#discussion_r3192427427
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/RowLevelOperation.java:
##########
@@ -105,4 +105,45 @@ default String description() {
default NamedReference[] requiredMetadataAttributes() {
return new NamedReference[0];
}
+
+
+ /**
+ * Controls whether to send only the required data columns to the connector
rather than the
+ * full row.
+ * <p>
+ * When true, Spark narrows the data column schema ({@link
LogicalWriteInfo#schema()}) to only
+ * the columns declared via {@link #requiredDataAttributes()}. Metadata
columns (from
+ * {@link #requiredMetadataAttributes()}) and row ID columns (from
+ * {@link SupportsDelta#rowId()}) are unaffected and always projected
separately.
+ * <p>
+ * If {@link #requiredDataAttributes()} returns a non-empty array, the write
schema is exactly
+ * those columns in declared order. The connector must include all columns
it wants to receive,
+ * including the columns being updated. If {@link #requiredDataAttributes()}
returns an empty
+ * array, Spark sends only the non-identity assigned columns (heuristic
path).
+ *
+ * @since 4.2.0
+ */
+ default boolean supportsColumnUpdates() {
Review Comment:
Given the scope of this PR, shall we mention that `DELETE and MERGE ignores
this method`?
--
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]