[
https://issues.apache.org/jira/browse/CALCITE-7044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan updated CALCITE-7044:
--------------------------------
Description:
Add internal operator NOT NULL to enhance rewrite COALESCE operator.
This issue originated from the discussion of CALCITE-6978.
A new NOT NULL internal operator was added, indicating that this expression
will never be NULL.
The expression coalesce(a,b) can be transformed into CASE WHEN a is not null
THEN NOT NULL(a) ELSE b
1) `not null` operator doesn't do anything, just tell the validator this filed
is not null.
2) When we do RelToSQL, we can ignore it directly.
Notice:If the query contains nondeterministic function calls, like RANDOM.
Duplicating such will produce different results,
was:
Add internal operator NOT NULL to enhance rewrite COALESCE operator.
This issue originated from the discussion of CALCITE-6978.
A new NOT NULL internal operator was added, indicating that this expression
will never be NULL.
The expression coalesce(a,b) can be transformed into CASE WHEN a is not null
THEN NOT NULL(a) ELSE b
1) `not null` operator doesn't do anything, just tell the validator this filed
is not null.
2) When we do RelToSQL, we can ignore it directly.
> Add internal operator NOT NULL to enhance rewrite COALESCE operator
> -------------------------------------------------------------------
>
> Key: CALCITE-7044
> URL: https://issues.apache.org/jira/browse/CALCITE-7044
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Priority: Major
>
> Add internal operator NOT NULL to enhance rewrite COALESCE operator.
> This issue originated from the discussion of CALCITE-6978.
> A new NOT NULL internal operator was added, indicating that this expression
> will never be NULL.
> The expression coalesce(a,b) can be transformed into CASE WHEN a is not null
> THEN NOT NULL(a) ELSE b
> 1) `not null` operator doesn't do anything, just tell the validator this
> filed is not null.
> 2) When we do RelToSQL, we can ignore it directly.
> Notice:If the query contains nondeterministic function calls, like RANDOM.
> Duplicating such will produce different results,
--
This message was sent by Atlassian Jira
(v8.20.10#820010)