-
Notifications
You must be signed in to change notification settings - Fork 94
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 SourceScanOptimizer
generating duplicated columns
#1494
Merged
Commits on Oct 30, 2024
-
Check when optimizing metric scans with similar aliases
This commit adds a check to `can_combine`, which is called by the `SourceScanOptimizer` when determining whether it can combine two branches into one. The new check makes sure we only combine branches if: - both branches don't share aliases - if they do share aliases, the aliases refer to different things
Configuration menu - View commit details
-
Copy full SHA for b0a54fe - Browse repository at this point
Copy the full SHA b0a54feView commit details -
Add tests for derived metrics with shared aliases
This commit adds dataflow and SQL snapshot tests that verify we're not generating duplicated aliases when combining branches. I created 3 new dummy metrics for these tests: `derived_sharedalias_1a`, `derived_sharedalias_1b` and `derived_sharedalias_2`. The `1a` and `1b` variant both make `shared_alias` refer to `bookings`, while the `2` variant makes it refer to `instant_bookings`. This way we can test the 2 cases: - If the alias refers to the same thing (`1a` vs `1b`), we can merge branches safely - If the alias refers to different things (`1a` vs `2`), we cannot merge branches safely
Configuration menu - View commit details
-
Copy full SHA for cac1d59 - Browse repository at this point
Copy the full SHA cac1d59View commit details -
Add integration test for derived metrics with shared aliases
This commit adds a new integration test that uses `derived_sharedalias_1a` and `derived_sharedalias_2`. I manually optimized the SQL from the output of the optimized SQL snapshot.
Configuration menu - View commit details
-
Copy full SHA for 2f9bf6b - Browse repository at this point
Copy the full SHA 2f9bf6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba207b9 - Browse repository at this point
Copy the full SHA ba207b9View commit details
Commits on Nov 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 86fbfbd - Browse repository at this point
Copy the full SHA 86fbfbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b7d1bc - Browse repository at this point
Copy the full SHA 1b7d1bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a7b603 - Browse repository at this point
Copy the full SHA 8a7b603View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57e0611 - Browse repository at this point
Copy the full SHA 57e0611View commit details
Commits on Nov 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3583f92 - Browse repository at this point
Copy the full SHA 3583f92View commit details
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.