[
https://issues.apache.org/jira/browse/FLINK-35981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonard Xu resolved FLINK-35981.
--------------------------------
Resolution: Fixed
master: 84ef9d5daa78412b3f2f4dc087e8ea2e4be93b7c
> 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
> Affects Versions: cdc-3.1.1
> Reporter: yux
> Assignee: MOBIN
> Priority: Critical
> Labels: pull-request-available
> Fix For: cdc-3.2.0
>
>
> 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)