Fix twin strategy implementation#278
Merged
simonpannek merged 29 commits intodremio:mainfrom Mar 20, 2025
Merged
Conversation
a5f64f1 to
28d8d53
Compare
c952e4f to
1148c5c
Compare
34962ef to
b4737e1
Compare
2c2dc26 to
34962ef
Compare
5861848 to
0c82601
Compare
simonpannek
commented
Mar 11, 2025
simonpannek
commented
Mar 11, 2025
simonpannek
commented
Mar 11, 2025
35a3931
howareyouman
previously approved these changes
Mar 14, 2025
9a4747f to
97fc657
Compare
97fc657 to
f07a240
Compare
d78ecb6 to
a61d5f9
Compare
howareyouman
previously approved these changes
Mar 20, 2025
howareyouman
left a comment
There was a problem hiding this comment.
I don't see any other major changes from the last review.
Member
Author
|
@howareyouman after rebasing, we had new failing tests, so these had to be adjusted. I also just realized we released 1.8.2 in the meanwhile, so this change needs to be moved to 1.8.3 |
howareyouman
approved these changes
Mar 20, 2025
bcmeireles
approved these changes
Mar 20, 2025
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.
Summary
dbt assumes tables and views share locations, unlike Dremio that keeps tables and views separately. We address this conflict using the twin-strategy. Currently, the adapter's clone strategy seems to create a view for every table, even if there is no conflicting view to be replaced.
Description
With this change, we introduce a check that will only overwrite existing views, not create new ones on table creation when the
clonestrategy is enabled. When a view is created with a conflicting table, the view will always select the existing table.Test Results
Due to this change, tests that queried the corresponding view after table creation (instead of the table directly) were failing due to this change. The schema of all affected tests have been adjusted.
Changelog