When parsing statements, which containe a CASE and the ELSE part of the CASE is a arithmetic function like /,+,- ... an exception is thrown.
Example statement throwing the exception:
select p, case when sum(a)=0 then 1 else 1*2 end as f from anything
the 1*2 part is the one causing the exception.
select p, case when sum(a)=0 then 1 else 2 end as f from anything
is parsed correctly
The grammar just needs updated to accept a SimpleExpression for K_CASE statements instead of PrimaryExpession.