rdblue commented on code in PR #7887:
URL: https://github.com/apache/iceberg/pull/7887#discussion_r1240041874
##########
api/src/main/java/org/apache/iceberg/view/ViewVersion.java:
##########
@@ -78,5 +78,10 @@ default String operation() {
default void check() {
Preconditions.checkArgument(
summary().containsKey("operation"), "Invalid view version summary,
missing operation");
+ String operation = summary().get("operation");
+ Preconditions.checkArgument(
+ "create".equals(operation) || "replace".equals(operation),
+ "Invalid operation. Must be create or replace but was: %s",
+ operation);
Review Comment:
Won't this prevent loading any view with a bad operation? That doesn't seem
like something that should completely break a view.
--
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]