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: ensure coalesce handles optional/unknown/null properly #268

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

sgulseth
Copy link
Member

@sgulseth sgulseth commented Dec 4, 2024

We weren't really handling coalesce well:

  1. We were pushing null into the list of possible types
  2. We weren't handling unknowns
  3. Even if we encountered a node that could never be null due to non-optional or no nulls in union we were still continuing

Opted to remove the snapshot and rather be explicit

@sgulseth sgulseth requested a review from judofyr December 4, 2024 23:04
@sgulseth sgulseth force-pushed the fix/typeEvaluate/coalesce branch from 079d83f to 570593a Compare December 4, 2024 23:06
@sgulseth sgulseth force-pushed the fix/typeEvaluate/coalesce branch from 570593a to a064c34 Compare December 4, 2024 23:06
Copy link
Collaborator

@judofyr judofyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good and then I'm happy 🥳 Haven't looked deeply into the logic itself, but if we think there's still some bugs there I think we should rather invest in getting the typeEvaluateCompare tests on coalesce since we can then test a lot of combinations.

@sgulseth
Copy link
Member Author

sgulseth commented Dec 5, 2024

yess, agree on the compare 🙃 Soon!

@sgulseth sgulseth merged commit 610e21e into main Dec 5, 2024
8 checks passed
@sgulseth sgulseth deleted the fix/typeEvaluate/coalesce branch December 5, 2024 13:40
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.

2 participants