Re: [DISCUSS] CAST DOUBLE to BOOLEAN

2023-01-18 Thread Julian Hyde
I agree, we should not support converting (explicitly or implicitly) any numeric type to BOOLEAN. We made a mistake when we documented the conversions (the table did not match actual or intended behavior) I have just logged https://issues.apache.org/jira/browse/CALCITE-5485 to ensure that the

Re: [DISCUSS] CAST DOUBLE to BOOLEAN

2023-01-17 Thread Ruben Q L
Hello, IIRC there was a discussion some time ago about this topic, see comments in https://issues.apache.org/jira/browse/CALCITE-4777 and related tickets (all of them still open). Best, Ruben On Mon, Jan 16, 2023 at 3:46 PM Николай Ижиков wrote: > Hello. > > Right now, Calcite allows to cast

[DISCUSS] CAST DOUBLE to BOOLEAN

2023-01-16 Thread Николай Ижиков
Hello. Right now, Calcite allows to cast FLOAT, DOUBLE expressions to BOOLEAN. But, results is always `false`. Cast works as `java.lang.Boolean.parseBoolean` call and always return false for anything except «true» string(`Primitive#parse`). Simple additional test for `InterpreterTest` shows