Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
SQL:
// code placeholder select * from xxx where cast(n as boolean)
In calcite, casting a non-zero number to boolean is always false, which is different with other databases. The other databases shows that casting zero to boolean is false and casting non-zero value to boolean is true.
Attachments
Issue Links
- is duplicated by
-
CALCITE-5959 Cast(200 as boolean) should return true(consistent with Postgres and Mysql)
- Resolved
-
CALCITE-4777 Casting from DECIMAL to BOOLEAN throws an exception
- Closed
-
CALCITE-4810 Failed to cast a double field (which isn't a literal) to boolean in the test case.
- Closed
- is related to
-
CALCITE-5662 CAST(BOOLEAN as INTEGER) throws a NumberFormatException
- Closed