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

Evaluate CASE WHEN expressions lazily #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dallmair
Copy link
Contributor

@dallmair dallmair commented Aug 16, 2024

This PR adds unit tests for the existing behavior to ensure single and eager evaluation of most expressions, and a unit test that provokes the bug reported in #65. Obviously, it also contains a fix for the issue at hand: It moves evaluation of all CASE WHEN expressions (conditions, then clauses, else clause) to dedicated functions with their own scope, such that extraction and assignment of subexpression result values to temporary variables does not cross the condition scope anymore.

Closes #65

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.

CASE WHEN expression labels evaluated eagerly instead of lazily
1 participant