Skip to content

Evaluate CASE WHEN expressions lazily#66

Open
dallmair wants to merge 3 commits intoterrajobst:mainfrom
dallmair:fix/lazy-case-when
Open

Evaluate CASE WHEN expressions lazily#66
dallmair wants to merge 3 commits intoterrajobst:mainfrom
dallmair:fix/lazy-case-when

Conversation

@dallmair
Copy link
Copy Markdown
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