fix: eager source row fetching logic#2071
Merged
Abacn merged 1 commit intoGoogleCloudPlatform:mainfrom Jan 7, 2025
Merged
Conversation
eb82917 to
67df9a2
Compare
67df9a2 to
4aa7a3f
Compare
This is an old bug which could only surface with the more recent addition of custom Cypher queries. The template tries to pre-fetch source data. It does it for text sources, since they do not support SQL pushdown, so their data is required for post-processing anyway. Before this commit, the template also pre-fetched data when none of the source's targets defined source transformations. This is overly restrictive and actually wrong. Custom query targets cannot define source transformations. If they share a source with a node/rel targets that define custom source transformations, then the template would crash with a NPE. This is now fixed. Source data is pre-fetched as long as there is at least one of its target that does not define any transformation. The commit also adds another small optimization: if the source does not match any active targets, the source processing is skipped completely. Before that, the data could be pre-fetched, incurring unnecessary data movement.
4aa7a3f to
1b6a2c5
Compare
venikkin
approved these changes
Jan 7, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2071 +/- ##
=========================================
Coverage 46.57% 46.57%
- Complexity 3957 3959 +2
=========================================
Files 869 869
Lines 51600 51599 -1
Branches 5404 5403 -1
=========================================
+ Hits 24031 24033 +2
+ Misses 25849 25847 -2
+ Partials 1720 1719 -1
|
Abacn
approved these changes
Jan 7, 2025
taherkl
added a commit
to ollionorg/DataflowTemplates-fork
that referenced
this pull request
Jan 8, 2025
fix: eager source row fetching logic (GoogleCloudPlatform#2071)
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.
No description provided.