You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2025/12/18 17:34:00 UTC

[jira] [Updated] (IGNITE-27395) Sql. Expressions with dynamic parameters and NULL (e.g. NULL + ?int) are not simplified to NULL after calcite 1.41

     [ https://issues.apache.org/jira/browse/IGNITE-27395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Zhuravkov updated IGNITE-27395:
--------------------------------------
    Summary: Sql. Expressions with dynamic parameters and NULL (e.g. NULL + ?int) are not simplified to NULL after calcite 1.41  (was: Sql. Expressions with dynamic parameters and NULL (e.g. NULL + ?) are not simplified to NULL after calcite 1.41)

> Sql. Expressions with dynamic parameters and NULL (e.g. NULL + ?int) are not simplified to NULL after calcite 1.41
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-27395
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27395
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql ai3
>            Reporter: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> Calcite 1.41 made some changes related to expression simplification. 
> For example (NULL + ?) expression, that is successfully simplified in calcite 1.40, is no longer simplified to NULL, because this code no calls isSafeExpression(e) that is false for (NULL + ?) so the branch with simplification code is not taken.
> {noformat} Calcite 1.41 
> RexNode simplify(RexNode e, RexUnknownAs unknownAs) {
>     if (isSafeExpression(e) && STRONG.isNull(e)) {
>      ...
>     }
> } 
> {noformat}
> In calcite 1.40  `isSafeExpression(e)` is also returns `false`, but `simplify` does not perform `isSafeExpression(e)` check.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)