-
Notifications
You must be signed in to change notification settings - Fork 477
Filter optimizer logical op "or" and "one" #2074
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
Draft
stevenyoungs
wants to merge
94
commits into
gramps-project:master
Choose a base branch
from
stevenyoungs:filter-optimizer-logical_op_or
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Filter optimizer logical op "or" and "one" #2074
stevenyoungs
wants to merge
94
commits into
gramps-project:master
from
stevenyoungs:filter-optimizer-logical_op_or
Conversation
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
…han the sub-filters logical_op when calculating the result. Fixes #13799
Co-authored-by: Doug Blank <[email protected]>
Co-authored-by: Kari Kujansuu <[email protected]>
…union to further reduce the search space
selected_handles \ all_handles is a superset of the potential result of a rule. Therefore symmetric_difference cannot be used reliably - it will potentially exclude handles which should be in the result.
…ing a rule is the empty set. Later, when we computer the difference(set(), self.all_handles) the correct result of self.all_handles is obtained.
Co-authored-by: stevenyoungs <[email protected]>
Co-authored-by: stevenyoungs <[email protected]>
Co-authored-by: stevenyoungs <[email protected]>
Co-authored-by: stevenyoungs <[email protected]>
The only way we can optimize "or" would be if all rules (at that level) have selected_handles. |
Yes I reached that conclusion as well and gave up for a bit. It may just be inverted unoptimized rules that are a problem when the logical op is "or". Let's see if my latest attempt passes the tests..... |
…"not (I0001 and I0002)"
5e9eee2
to
5ba2f3f
Compare
8c506ef
to
927e1fe
Compare
c9fbf15
to
722935d
Compare
…hat uses "or" and invert
If there is more than one rule, for "one" or "or", then all rules must be optimized in order to optimize the filter.
722935d
to
bd3c4e6
Compare
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.
Enable the filter optimizer to optimize filters the use logical operations of "one" or "or"
Note: this branch needs to be rebased once #2052 is merged into maintenance/gramps60 and onward merged into master