[
https://issues.apache.org/jira/browse/CALCITE-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wang Yanlin updated CALCITE-3464:
---------------------------------
Attachment: pics.jpg
> RexSimplify simplifies plan having filter with NULL to empty values
> -------------------------------------------------------------------
>
> Key: CALCITE-3464
> URL: https://issues.apache.org/jira/browse/CALCITE-3464
> Project: Calcite
> Issue Type: Bug
> Reporter: Wang Yanlin
> Priority: Major
> Attachments: pics.jpg
>
>
> When filter by comparing to null in sql, the plan will get empty result
> {code:java}
> @Test public void testSimplifyItemEqualNull() {
> String query = "select * from sales.customer as t1 where name = NULL";
> sql(query)
> .withTester(t -> createDynamicTester())
> .withRule(ReduceExpressionsRule.FILTER_INSTANCE)
> .check();
> }
> {code}
> The plan after optimization is like this
> {code:java}
> LogicalProject(**=[$1])
> LogicalValues(tuples=[[]])
> {code}
> The optimized plan will get empty result, is this the result we want?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)