-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: Compound filter operators with relations #1855
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.
I've gone over everything outside the filter package, which I'll try and do later/tomorrow depending on how much time/energy I have left.
I like how you have done it from what I have seen so far, my requests are all fairly localised I think. If I haven't finished my review by Friday afternoon and someone else has approved (and you have responded to all my comments so far) please feel very free to dismiss my request for changes and merge without my approval.
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.
Looks good to me, have gone through everything and am happy, assuming the (small/localised) comments I've left are responded to sensibly :)
planner/filter/copy_field.go
Outdated
|
||
// CopyField copies the given field from the provided filter. | ||
// The result filter preserves the structure of the original filter. | ||
func CopyField(filter *mapper.Filter, field mapper.Field) *mapper.Filter { |
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.
suggestion: This looks like it could be made private?
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.
This is actually a question: what makes a function a good candidate for being public? Is it just usage from another package? Some function are just nice utilities that can be used later.
Codecov ReportPatch coverage:
@@ Coverage Diff @@
## develop #1855 +/- ##
===========================================
+ Coverage 70.18% 70.45% +0.28%
===========================================
Files 225 232 +7
Lines 23987 24184 +197
===========================================
+ Hits 16833 17038 +205
+ Misses 5996 5991 -5
+ Partials 1158 1155 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
222b8d4
to
a35edfc
Compare
## Relevant issue(s) Resolves sourcenetwork#1808 ## Description Any time a filter with `_and` or `_or` operator that includes relations is applied it will fail. There were 2 problems: - filter is not recursively analysed during mapping phase which would result in some relational fields not being mapped and later panic upon attempt to access them. - the filter is not properly split between the scan and select nodes. It would just analyse and split top-level fields. These problems are fixed.
Relevant issue(s)
Resolves #1808
Description
Any time a filter with
_and
or_or
operator that includes relations is applied it will fail.There were 2 problems:
These problems are fixed.
Tasks
How has this been tested?
Integration tests
Specify the platform(s) on which this was tested: