Is this a known problem or something? I’m trying to perform a very simple query with a CASE statement and I get an error. I even dumbed it down to the simplest possible query similar to what’s shown in the documentation and I still get an error.
SELECT
id,
CASE
WHEN status = 1 THEN 'ACTIVE'
END as status
FROM
nt_product;
When trying to do this in the web console, I get the following error with a red dot on the CASE line.
exception in function factory:
Checking the logs I can see this:
Feb 17 22:26:14 10228 questdb[787]: 2025-02-17T21:26:14.724534Z E i.q.g.FunctionParser exception in function factory:
Feb 17 22:26:14 10228 questdb[787]: java.lang.UnsupportedOperationException
Feb 17 22:26:14 10228 questdb[787]: at io.questdb.griffin.engine.functions.IntFunction.getByte(IntFunction.java:55)
Feb 17 22:26:14 10228 questdb[787]: at io.questdb.griffin.engine.functions.conditional.SwitchFunctionFactory.getByte(SwitchFunctionFactory.java:174)
Feb 17 22:26:14 10228 questdb[787]: at io.questdb.griffin.engine.functions.conditional.SwitchFunctionFactory.getIntKeyedFunction(SwitchFunctionFactory.java:420)
Feb 17 22:26:14 10228 questdb[787]: at io.questdb.griffin.engine.functions.conditional.SwitchFunctionFactory.newInstance(SwitchFunctionFactory.java:136)