cloud-fan commented on code in PR #38004:
URL: https://github.com/apache/spark/pull/38004#discussion_r982037071
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/LogicalWriteInfo.java:
##########
@@ -45,4 +45,18 @@ public interface LogicalWriteInfo {
* the schema of the input data from Spark to data source.
*/
StructType schema();
+
+ /**
+ * the schema of the input metadata from Spark to data source.
+ */
+ default StructType metadataSchema() {
+ return null;
Review Comment:
Returning null is pretty risky as you don't know when/where a NPE will
happen. I'd prefer throw `UnsupportedOperation` by default.
--
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]