Unexpected result when composing aggregations with case
expressions
#5175
Labels
bug
Invalid compiler output or panic
case
expressions
#5175
What happened?
Hi,
I am experiencing a bug where prql generates an invalid SQL because there is a
case
expression inside a sum. Let me demonstrate.PRQL input
SQL output
Expected SQL output
MVCE confirmation
Anything else?
For some reason the system breaks the expression into a intermediary CTE for the sum when the
case
expr exists.The text was updated successfully, but these errors were encountered: