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

Fix filtering behavior within non-existent @optional blocks. #697

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

obi1kenobi
Copy link
Owner

@obi1kenobi obi1kenobi commented Nov 8, 2024

Analogous update to #692, just for filtering instead of type coercion.

We used to attempt to apply filters to the contents of an @optional block when the @optional edge did not exist. This is semantically incorrect behavior — it makes the combination of filters and @optional useless since the optional results always get discarded when the @optional edge doesn't exist.

This PR reproduces the problem in a variety of settings, and fixes all of them.

  • Add test data that reproduces incorrect query evaluation.
  • Add filtering fix and update test cases.

@obi1kenobi obi1kenobi enabled auto-merge (squash) November 8, 2024 16:10
@obi1kenobi obi1kenobi merged commit 0cf158a into main Nov 8, 2024
13 checks passed
@obi1kenobi obi1kenobi deleted the fix_filtering_within_nonexistent_optional branch November 8, 2024 16:11
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