Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Jun 23, 2023

According to the View Spec the operation must be set to either create or replace, so this makes sure that this can't be set to a random value

@nastra nastra force-pushed the view-version-operation-check branch from bae397b to 4de8e41 Compare June 23, 2023 06:46
Preconditions.checkArgument(
"create".equals(operation) || "replace".equals(operation),
"Invalid operation. Must be create or replace but was: %s",
operation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this prevent loading any view with a bad operation? That doesn't seem like something that should completely break a view.

@rdblue
Copy link
Contributor

rdblue commented Jun 23, 2023

I don't think this is necessary. Tables don't validate this and don't fail to load if it is invalid.

@nastra nastra closed this Jul 20, 2023
@nastra nastra deleted the view-version-operation-check branch July 20, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants