[
https://issues.apache.org/jira/browse/CALCITE-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723448#comment-17723448
]
Sergey Nuyanzin edited comment on CALCITE-5703 at 5/17/23 1:14 PM:
-------------------------------------------------------------------
usually no need for a separate Jira issue for update dependencies
Since I'm involved in this Janino's issue and do testing there, I could make an
update once the issue is fixed and new release is available.
Well in fact same issue could be reproduced without Flink , examples of code to
reproduce it while compilation (no Flink code is required)
{code:java}
"Object o = true ? null : \"\";"
{code}
{code:java}
"String s2 = new StringBuilder().append(true ? null : \"abc\").toString();"
{code}
while same code with explicit cast works fine
{code:java}
"Object o = true ? (String) null : \"\";"
{code}
{code:java}
"String s2 = new StringBuilder().append(true ? (String)null :
\"abc\").toString();"
{code}
was (Author: sergey nuyanzin):
usually no need for a separate Jira issue for update dependencies
Since I'm involved in this Janino's issue and do testing there, I could make an
update once the issue is fixed and new release is available.
Well in fact same issue could be reproduced without Flink , examples of code to
reproduce it while compilation (no Flink code is required)
{code:java}
"Object o = true ? null : \"\";"
{code}
{code:java}
"String s2 = new StringBuilder().append(true ? null : \"abc\").toString();"
{code}
> Reduce amount of generated runtime code
> ---------------------------------------
>
> Key: CALCITE-5703
> URL: https://issues.apache.org/jira/browse/CALCITE-5703
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.34.0
> Reporter: Evgeny Stanilovsky
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: patch-available
>
> In some cases runtime generates code like :
> {noformat}
> return case_when_value == null ? (String) null : some_oparation();
> or
> return input_value == null ? (Long) null : Long.valueOf(...;
> {noformat}
> this redundant casting probably not harmful, but there is another side -
> maximum method size, this size jdk[1], janino [2] throws : *Code grows beyond
> 64 KB* . This PR reduces code generated by calcite runtime thus more huge
> expressions can be executed.
> [1]
> https://github.com/openjdk/jdk/blob/d22bcc813eea719b817d3d541a843594675c0ca9/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java#L101
> [2]
> https://github.com/janino-compiler/janino/blob/e69022f5aaabd36edc08a2074360d62514493a19/janino/src/main/java/org/codehaus/janino/CodeContext.java#L699
--
This message was sent by Atlassian Jira
(v8.20.10#820010)