-
Notifications
You must be signed in to change notification settings - Fork 99
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
Bug fix: Generate correct instances for JoinOnEntitiesNode
#1499
Merged
Conversation
This file contains 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
1dafb8f
to
7e7a3fe
Compare
7e7a3fe
to
9449f68
Compare
47c3730
to
a285c63
Compare
This follows the exact same pattern as the existing group_specs_by_type() helper, but for instances.
b1ccb3b
to
f5c1eff
Compare
JoinOnEntitiesNode
f5c1eff
to
cd93940
Compare
JoinOnEntitiesNode
JoinOnEntitiesNode
Also general cleanup / simplification for this node's dataflow to SQL logic.
cd93940
to
acb0295
Compare
WilliamDee
approved these changes
Nov 4, 2024
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.
There is an internal bug in the dataflow to SQL logic for the
JoinOnEntitiesNode
that does not appear to impact production, but does impact work I'm doing up the stack. The instances generated in the node contained column associations that were not correct. They referenced the old column associations (from the parent dataset), which did not include the entity links that were added in this node. These incorrect column associations did not appear to be used for anything, and the select columns were generated from the specs instead (which is correct), so that's why this bug flew under the radar.This PR removes the logic that was causing the bug (the
AddLinkToLinkableElements
instance converter). Instead, it adds logic to loop through the parent instances and build new instances & select columns simultaneously.This change left a lot of boilerplate & duplicate code in the function, so I moved a lot of that out to helpers for the instances and specs.
This also adds a lot of simplification for the
JoinOnEntitiesNode
. It's one of our oldest nodes and was quite verbose.I recommend reviewing by commit. The snapshot changes are primarily changes to the column order and some node identifiers. There should be no actual behavior changes here.