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.
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