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

Reproduce buggy coercion behavior directly inside @optional edge. #692

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

obi1kenobi
Copy link
Owner

@obi1kenobi obi1kenobi commented Nov 7, 2024

If an edge is @optional, it's allowed to not exist in the data we return. The semantics of type coercion and filtering operations within the @optional then become conditional: they apply only if the edge exists for a given row. If the edge didn't exist, all outputs within the @optional block are null and we skip coercions and filters.

We were inappropriately applying type coercions to rows where an @optional edge didn't exist. This PR reproduces and fixes that problem.

@obi1kenobi obi1kenobi marked this pull request as ready for review November 7, 2024 23:55
@obi1kenobi obi1kenobi force-pushed the coercion_inside_optional_bug branch from ac6b197 to f7a8950 Compare November 8, 2024 00:02
Apparently we had a test case that partly covered this, but it was
producing a subtly wrong output.
@obi1kenobi obi1kenobi merged commit e5ef0c9 into main Nov 8, 2024
20 checks passed
@obi1kenobi obi1kenobi deleted the coercion_inside_optional_bug branch November 8, 2024 00: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