[
https://issues.apache.org/jira/browse/CALCITE-6982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Xu closed CALCITE-6982.
--------------------------
Resolution: Not A Problem
> Removes cast from string support with IS_NULL/IS_NOT_NULL
> ---------------------------------------------------------
>
> Key: CALCITE-6982
> URL: https://issues.apache.org/jira/browse/CALCITE-6982
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
>
> SQL
> {code:java}
> select \"employee_id\" from \"foodmart\".\"employee\"
> where 10 is distinct from cast('10' as int){code}
> would covert to
> {code:java}
> SELECT \"employee_id\"\nFROM \"foodmart\".\"employee\"\nWHERE (10 IS NOT NULL
> OR CAST('10' AS INTEGER) IS NOT NULL) AND 10 = '10' IS NOT TRUE {code}
> here CAST('10' AS INTEGER) IS NOT NULL : cast is not necessary
> should convert to:
> {code:java}
> SELECT \"employee_id\"\n FROM \"foodmart\".\"employee\"\n WHERE (10 IS NOT
> NULL OR '10' IS NOT NULL) AND 10 = '10' IS NOT TRUE{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)