I don't know if the SQL standard mandates a particular result for this query. It depends on how type inference works. If both sides are cast to char(4), then the result should be "true". If both sides are cast to VARCHAR, then the result should be "false".
Whether this is a bug or not depends really on what MySQL and Oracle do about this query. Mihai ________________________________ From: Zhe Hu <iluff...@163.com> Sent: Friday, December 20, 2024 11:51 PM To: dev@calcite.apache.org <dev@calcite.apache.org> Subject: String comparison with DEFAULT conformance Hi, community! I’ve encountered one confusing problem when I run the following test in JdbcTest with Calcite's DEFAULT conformance. It seems that expression “cast('Eric' as char(4))='Eric ‘“ returns true. However, when I use MYSQL or ORACLE conformance, the above comparison returns false. Is this intentional or a bug? Best regards, ZheHu