You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Leonard Xu (Jira)" <ji...@apache.org> on 2024/08/07 12:56:00 UTC

[jira] [Assigned] (FLINK-35981) Transform rule doesn't support referencing one column more than once

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

Leonard Xu reassigned FLINK-35981:
----------------------------------

    Assignee: MOBIN

> Transform rule doesn't support referencing one column more than once
> --------------------------------------------------------------------
>
>                 Key: FLINK-35981
>                 URL: https://issues.apache.org/jira/browse/FLINK-35981
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>            Reporter: yux
>            Assignee: MOBIN
>            Priority: Critical
>              Labels: pull-request-available
>
> Currently, transform rule (projection / filtering) doesn't support referencing one column more than once, which means if we write such a projection rule:
> transform:
>   - projection: \*, age * age AS age_square
>     filter: age < 18 OR age > 60
> Janino compiler will crash with the following exception stack. Seems duplicated columns were added into Janino arguments list:
> Caused by: org.apache.flink.shaded.guava31.com.google.common.util.concurrent.UncheckedExecutionException: org.apache.flink.api.common.InvalidProgramException: Expression cannot be compiled. This is a bug. Please file an issue.
> Expression: import static org.apache.flink.cdc.runtime.functions.SystemFunctionUtils.*;age * age
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2055)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache.get(LocalCache.java:3966)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
> 	at org.apache.flink.cdc.runtime.operators.transform.TransformExpressionCompiler.compileExpression(TransformExpressionCompiler.java:46)
> 	... 18 more
> Caused by: org.apache.flink.api.common.InvalidProgramException: Expression cannot be compiled. This is a bug. Please file an issue.
> Expression: import static org.apache.flink.cdc.runtime.functions.SystemFunctionUtils.*;age * age
> 	at org.apache.flink.cdc.runtime.operators.transform.TransformExpressionCompiler.lambda$compileExpression$0(TransformExpressionCompiler.java:62)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
> 	at org.apache.flink.shaded.guava31.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
> 	... 21 more
> Caused by: org.codehaus.commons.compiler.CompileException: Line 1, Column 82: Redefinition of parameter "age"



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