-
Notifications
You must be signed in to change notification settings - Fork 44
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
refactor: Rework limit node flow #767
Conversation
return false | ||
} | ||
|
||
if !s.Limit.equal(other.Limit) { |
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.
todo: Since you are adding this new Limit comparison, please update the above Note
.
suggestion(non-blocking): Removal of these lines:
// Note: Currently only compares Name and Filter as that is all that is currently required,
// but this should be extended in the future.
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.
Ah cheers, I saw that and forgot about it by the time I'd fixed the tests. Changing.
- Update comment
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.
Beauty of a PR! Nice and clean to review. LGTM.
Codecov Report
@@ Coverage Diff @@
## develop #767 +/- ##
===========================================
- Coverage 58.36% 58.31% -0.05%
===========================================
Files 147 147
Lines 16833 16780 -53
===========================================
- Hits 9824 9786 -38
+ Misses 6084 6072 -12
+ Partials 925 922 -3
|
Some loss of efficiency here, I think the new limit nodes will make use of the same valuesNode (so not fetching from file twice) but not sure. The planner should be able to optimise this better in the future by using the (bigger) limitNode as the source of the smaller limit node or something similar.
4a40320
to
585c202
Compare
I rebased the aggregate-limit branch onto this one and can confirm that it solves the problem |
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.
LGTM. Very straight forward and a good cleanup. I like it!
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.
LGTM!
* Add tests for one-many limits * Simplify limit logic to make use of mapper Some loss of efficiency here, I think the new limit nodes will make use of the same valuesNode (so not fetching from file twice) but not sure. The planner should be able to optimise this better in the future by using the (bigger) limitNode as the source of the smaller limit node or something similar.
Relevant issue(s)
Resolves #764
Description
Reworks the limit logic, removing the 2 limit node types and instead relying on mapper to to add a new backing field if the limits are not equal. Should make it much much easier to add (full) limit support for aggregates, as previously they were tripping up on the deleted lines in planner (RE parent aggregates), this task was broken out of that piece of work as I saw it as an easy way to break up the PR, and a valuable improvement to the code in its own right.
There is some loss of efficiency here, I think the new limit nodes will make use of the same valuesNode (so not fetching from file twice) but not sure. The planner should be able to optimize this better in the future by using the (bigger) limitNode as the source of the smaller limit node or something similar. I am happy saving that plan optimization for another day, but please let me know your thoughts on this.
Specify the platform(s) on which this was tested: