-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix materialized view failure mode when base table gone #15929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix materialized view failure mode when base table gone #15929
Conversation
17207ba to
6deb2b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapshotAtRefresh seems too specialized in the scope of this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you would suggest here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapshotAtRefresh -> snapshotId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, and will also rename to isSnapshotCurrent
This is just a refactor - Inline `getTableToken` - Remove redundant `TableToken` (it is not used for populating DEPENDS_ON_TABLES field, so doesn't provide any encapsulation) - reduce visibility - remove redundant cast & conversions - move below the usage, as it is a helper - give the method a better name.
Reporting `MaterializedViewNotFoundException` for a freshness check resulted in `SELECT .. FROM mv` query failing in "materialized view mv does not exist", which was not correct, since it exists, just cannot be queried.
6deb2b6 to
387a9f0
Compare
Extracted from #15842