Mihai Budiu created CALCITE-7729:
------------------------------------
Summary: 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
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)