[ 
https://issues.apache.org/jira/browse/CALCITE-7147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016887#comment-18016887
 ] 

Mihai Budiu commented on CALCITE-7147:
--------------------------------------

This seems to happen because only 1 is treated as TRUE in type coercion.

> Comparison of INTEGER and BOOLEAN produces strange results
> ----------------------------------------------------------
>
>                 Key: CALCITE-7147
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7147
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> The following test in RelToSqlConverterTests passes:
> {code:java}
>     final String query = "select FALSE = 256";
>     final String expected = "SELECT *\nFROM (VALUES (TRUE)) AS \"t\" 
> (\"EXPR$0\")";
>     sql(query).ok(expected);
> {code}
> I can't really imagine why FALSE would be equal to 256 under any reasonable 
> interpretation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to