Skip to content
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

remove redundant clauses when normalizing #1505

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

brharrington
Copy link
Contributor

In some cases with tooling a :cq can get applied multiple times. If the common query condition has an OR clause, then that will get expanded with the cross product when computing the DNF. As a result, the normalized query resulting from applying a :cq once would differ from applying the same :cq multiple times. This change removes redundant clauses from the normalized OR set to avoid the discrepancy. Redundant means that the removed clause will not change the result since another branch of the OR would have matched.

In some cases with tooling a `:cq` can get applied multiple
times. If the common query condition has an OR clause, then
that will get expanded with the cross product when computing
the DNF. As a result, the normalized query resulting from
applying a `:cq` once would differ from applying the same
`:cq` multiple times. This change removes redundant clauses
from the normalized OR set to avoid the discrepancy. Redundant
means that the removed clause will not change the result
since another branch of the OR would have matched.
@brharrington brharrington added this to the 1.7.0 milestone Dec 14, 2022
@brharrington brharrington merged commit c2dd5c3 into Netflix:main Dec 14, 2022
@brharrington brharrington deleted the norm-redundant branch December 14, 2022 23:59
manolama pushed a commit to manolama/atlas that referenced this pull request May 22, 2024
In some cases with tooling a `:cq` can get applied multiple
times. If the common query condition has an OR clause, then
that will get expanded with the cross product when computing
the DNF. As a result, the normalized query resulting from
applying a `:cq` once would differ from applying the same
`:cq` multiple times. This change removes redundant clauses
from the normalized OR set to avoid the discrepancy. Redundant
means that the removed clause will not change the result
since another branch of the OR would have matched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant