amogh-jahagirdar commented on code in PR #13464:
URL: https://github.com/apache/iceberg/pull/13464#discussion_r2190128485


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java:
##########
@@ -234,6 +234,13 @@ private static void apply(UpdateSchema pendingUpdate, 
TableChange.AddColumn add)
         add.isNullable(),
         "Incompatible change: cannot add required column: %s",
         leafName(add.fieldNames()));
+    if (add.defaultValue() != null) {
+      throw new UnsupportedOperationException(
+          String.format(
+              "Cannot add column %s since default values are currently 
unsupported",
+              leafName(add.fieldNames())));
+    }

Review Comment:
   Thanks for the doc, I'll double check if there's some standard error code 
but I don't really agree with the linked error class since that's specific to 
query parsing failures (e.g. [some 
tests](https://github.com/apache/spark/pull/35690/files#diff-b9e91f767e5562861565b0ce78759af3bcb7fff405a81e928894641147db2ae4R2243)
 in the original Spark PR demonstrate the intention) whereas the intention of 
the implemented error is to surface that the Iceberg-Spark implementation just 
doesn't support this yet. 



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

Reply via email to