-
Couldn't load subscription status.
- Fork 3
Fix union overfetching #279
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request fixes an overfetching issue with union types by preserving type cast information in the query plan paths. I've left a few comments, including a critical fix for a compilation error due to a type mismatch when converting MergePath to PlanPathSegment.
✅
|
|
/gemini review |
|
/gemini summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The code changes introduce type conditions to the FetchNodes, effectively fixing union overfetching. The introduction of FlattenNodePath and FlattenNodePathSegment enhances code clarity and correctness. The comprehensive tests for the new traverse_and_collect logic are commendable.
Summary of ChangesThis pull request introduces a significant improvement to how union types are handled in query plan execution, specifically addressing the issue of overfetching. By implementing type conditions directly within the Highlights
Changelog
Activity
|
by adding type conditions to the FetchNodes
f0fcf45 to
cd1934a
Compare
| "product" | ||
| { | ||
| "Field": "product" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we also get rid of InlineFragment in the require selection set then move that type condition to here?
So instead of having ... on Product in requires selections, we can have { Cast: Product } in the flatten node's path directly, no?
by adding type conditions to the FetchNodes
summary of changes -> #279 (comment)
Closes #277