singhpk234 commented on code in PR #13464:
URL: https://github.com/apache/iceberg/pull/13464#discussion_r2188344970
##########
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:
[doubt][not a blocker] A while back we had a thread to align with Spark's
standardized error handling (doc :
https://docs.google.com/document/d/11qHUiCcKMJ-xAyfL__Yv7B1b5N-80-GIwE8AV96A2Ac/edit?tab=t.0)
if we are ok
can we throw this documented error class then
https://github.com/apache/spark/blob/master/sql/api/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala#L731
--
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]