Conversation
zorancv
reviewed
Mar 26, 2025
| if !column_exists(cols, &"block".to_string()) { | ||
| return false; | ||
| } | ||
| return dest_table.immutable; |
Contributor
There was a problem hiding this comment.
Suggested change
| return dest_table.immutable; | |
| if !dest_table.immutable { | |
| return false; | |
| } |
Contributor
There was a problem hiding this comment.
We need to check the rest of the columns in case the condition is true.
Collaborator
Author
There was a problem hiding this comment.
Doh .. yes, you are right.
zorancv
suggested changes
Mar 26, 2025
Contributor
zorancv
left a comment
There was a problem hiding this comment.
Thank you for fixing those issue!
Collaborator
Author
|
Just addressed the comment (and also beefed the test up a little more) |
zorancv
approved these changes
Mar 26, 2025
If an immutable entity type has a `block` column, we would emit the index on the block$ twice, making deployment fail
At the end of copying, we do not want to create indexes concurrently, but we do want the creation to be idempotent, i.e., have a 'if not exists' clause
Test that the create index statements do/do not contain 'if not exists'
Do not short-circuit checking other columns in the check for Block
45b9122 to
0e2ee0a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two issues with postponed index creation:
(1) When the table has a user-supplied
blockcolumn, we created the index onblock$twice(2) We did not create postponed indexes on
(<attr>, block$)