You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2026/08/21 03:23:00 UTC

[jira] [Resolved] (CALCITE-7729) Linq4j BlockBuilder.optimize can optimize away expressions that throw

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

Mihai Budiu resolved CALCITE-7729.
----------------------------------
    Fix Version/s: 1.43.0
         Assignee: Mihai Budiu
       Resolution: Fixed

Fixed in [https://github.com/apache/calcite/commit/197d569217eda062142d2e9164a8e00a1db6ab61]

Thank you for the review [~xuzifu666] 

> Linq4j BlockBuilder.optimize can optimize away expressions that throw
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-7729
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7729
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> Code handed to BlockBuilder:
> {code:java}
> final int x = 1 / i;
> return true ? 2 : x;{code}
> Output produced:
> {code:java}
> { return 2; }{code}
> Note that the division is no longer executed, although it was unconditional initially.



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