Hi community,
I have this sql: select * from "emps" where "name" <> '' and "name" <> '3'
I thought it would generate the same plan with
select * from "emps" where ("name" > '' or "name" < '') and ("name" > '3'
or "name" < '3')
but not, the not equal operator consistency is different with less than and
greater than operator,
which will cause the literal '' and '3' have different data type in plans
of the above sqls.
That behavior maybe cause some queries will not hit the materialization.
should we canonize ("name" > '' or "name" < '') and ("name" > '3' or
"name" < '3') to not equal or vice versa as RelToSql
<https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java#L870>
behaves?