-
Notifications
You must be signed in to change notification settings - Fork 304
fix: Correct dependency tracking for nested subqueries #3757
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
base: main
Are you sure you want to change the base?
Conversation
When an intermediate row (e.g., a team) changed its linking column (e.g., org_id) without changing the tracked column (e.g., id), the update was incorrectly filtered out. This caused stale tag tracking in the materializer, leading to incorrect row deletions when the old parent later lost its qualifying status. Changes: - shape.ex: Keep updates with tag changes even if selected columns are unchanged - materializer.ex: Skip value count updates when value is unchanged to avoid spurious move_out/move_in events 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughFixes dependency tracking for nested subqueries by preserving tag-only updates and separating tag-index updates from value_count/index updates so move events are not emitted when tracked column values remain unchanged; adds unit and integration tests reproducing and preventing the stale-tag behavior. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3757 +/- ##
===========================================
+ Coverage 75.75% 87.36% +11.61%
===========================================
Files 11 23 +12
Lines 693 2011 +1318
Branches 173 534 +361
===========================================
+ Hits 525 1757 +1232
- Misses 167 252 +85
- Partials 1 2 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
864881c to
f34dcdd
Compare
Summary
Changes
removed_move_tags != []) even if selected columns are unchangedTest plan
shape_test.exsforfiltered_columns_changed?behaviormaterializer_test.exsfor tag-only update handlingsubquery_dependency_update_test.exspass🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.