You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ruben Q L (Jira)" <ji...@apache.org> on 2021/08/21 09:50:00 UTC
[jira] [Resolved] (CALCITE-4741) AbstractRelNode#getId can overflow
into a negative value causing CompileException in certain Enumerable
implement methods
[ https://issues.apache.org/jira/browse/CALCITE-4741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruben Q L resolved CALCITE-4741.
--------------------------------
Resolution: Fixed
Fixed via https://github.com/apache/calcite/commit/94e2f98d9769ea17b9e8a6a478802f78a745e3f0
> AbstractRelNode#getId can overflow into a negative value causing CompileException in certain Enumerable implement methods
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-4741
> URL: https://issues.apache.org/jira/browse/CALCITE-4741
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.27.0
> Reporter: Ruben Q L
> Assignee: Ruben Q L
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.28.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {{AbstractRelNode#getId}} can overflow into a negative value.
> This id is used by the {{implement}} method of several Enumerable operators ({{EnumerableBatchNestedLoopJoin}} and {{EnumerableMergeUnion}}) to guarantee a unique variable name in the dynamic code, e.g.:
> {code:java}
> final ParameterExpression corrArgList =
> Expressions.parameter(Modifier.FINAL,
> List.class, "corrList" + this.getId());
> {code}
> However, if the id is negative, this variable name will have a "-", causing a {{CompileException}}:
> {noformat}
> ...
> final org.apache.calcite.linq4j.Enumerable _inputEnumerable1 = org.apache.calcite.linq4j.EnumerableDefaults.correlateBatchJoin(org.apache.calcite.linq4j.JoinType.LEFT, left0, new org.apache.calcite.linq4j.function.Function1() {
> public org.apache.calcite.linq4j.AbstractEnumerable apply(final java.util.List corrList-1794407755) {
> ...
> Caused by: java.util.concurrent.ExecutionException: org.codehaus.commons.compiler.CompileException: Line 134, Column 103: One of ', )' expected instead of '-'
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)