[ 
https://issues.apache.org/jira/browse/FLINK-29890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676719#comment-17676719
 ] 

Chalres Tan commented on FLINK-29890:
-------------------------------------

[~lsy] I think there still exists a bug here. Using your example code from the 
comment above but enabling checkpointing, I ran into issues with compiling 
(full stack trace below). Reproducible code example: 
[https://github.com/charles-tan/udfs-flink-1.16].

 
{code:java}
2188 [main] WARN  org.apache.flink.table.runtime.generated.GeneratedClass [] - 
Failed to compile split code, falling back to original code
org.apache.flink.util.FlinkRuntimeException: 
org.apache.flink.api.common.InvalidProgramException: Table program cannot be 
compiled. This is a bug. Please file an issue.
    at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:94)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.runtime.generated.GeneratedClass.compile(GeneratedClass.java:97)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.runtime.generated.GeneratedClass.getClass(GeneratedClass.java:120)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.runtime.operators.CodeGenOperatorFactory.getStreamOperatorClass(CodeGenOperatorFactory.java:51)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.preValidate(StreamingJobGraphGenerator.java:498)
 ~[flink-streaming-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:221)
 ~[flink-streaming-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:153)
 ~[flink-streaming-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.streaming.api.graph.StreamGraph.getJobGraph(StreamGraph.java:1017)
 ~[flink-streaming-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.client.StreamGraphTranslator.translateToJobGraph(StreamGraphTranslator.java:56)
 ~[flink-clients-1.16.0.jar:1.16.0]
    at 
org.apache.flink.client.FlinkPipelineTranslationUtil.getJobGraph(FlinkPipelineTranslationUtil.java:43)
 ~[flink-clients-1.16.0.jar:1.16.0]
    at 
org.apache.flink.client.deployment.executors.PipelineExecutorUtils.getJobGraph(PipelineExecutorUtils.java:59)
 ~[flink-clients-1.16.0.jar:1.16.0]
    at 
org.apache.flink.client.deployment.executors.LocalExecutor.getJobGraph(LocalExecutor.java:105)
 ~[flink-clients-1.16.0.jar:1.16.0]
    at 
org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:82)
 ~[flink-clients-1.16.0.jar:1.16.0]
    at 
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:2188)
 ~[flink-streaming-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.planner.delegation.DefaultExecutor.executeAsync(DefaultExecutor.java:95)
 ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeQueryOperation(TableEnvironmentImpl.java:884)
 ~[flink-table-api-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:1382)
 ~[flink-table-api-java-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.api.internal.TableImpl.execute(TableImpl.java:475) 
~[flink-table-api-java-1.16.0.jar:1.16.0]
    at 
com.example.UDFTest.shouldGenerateFlinkJobForInteractiveQueryWithUDFSuccessfullyWithCheckpointing(UDFTest.java:92)
 ~[test-classes/:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
    at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
 ~[?:?]
    at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
    at 
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
 ~[junit-platform-commons-1.8.1.jar:1.8.1]
    at 
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
 ~[junit-jupiter-engine-5.8.1.jar:5.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) 
~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
    at 
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) 
~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
    at 
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) 
~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
 ~[junit-platform-engine-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
 ~[junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
 ~[junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
 ~[junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
 [junit-platform-launcher-1.8.1.jar:1.8.1]
    at 
com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
 [junit5-rt.jar:?]
    at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) 
[junit-rt.jar:?]
    at 
com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) 
[idea_rt.jar:?]
    at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
 [junit-rt.jar:?]
    at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
 [junit-rt.jar:?]
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) 
[junit-rt.jar:?]
Caused by: 
org.apache.flink.shaded.guava30.com.google.common.util.concurrent.UncheckedExecutionException:
 org.apache.flink.api.common.InvalidProgramException: Table program cannot be 
compiled. This is a bug. Please file an issue.
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache.get(LocalCache.java:3962)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:92)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    ... 87 more
Caused by: org.apache.flink.api.common.InvalidProgramException: Table program 
cannot be compiled. This is a bug. Please file an issue.
    at 
org.apache.flink.table.runtime.generated.CompileUtils.doCompile(CompileUtils.java:107)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.lambda$compile$0(CompileUtils.java:92)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4864)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache.get(LocalCache.java:3962)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:92)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    ... 87 more
Caused by: org.codehaus.commons.compiler.CompileException: Line 9, Column 31: 
Cannot determine simple type name "util"
    at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12211) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6833) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6594) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6573) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$13900(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$1.visitReferenceType(UnitCompiler.java:6481)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$1.visitReferenceType(UnitCompiler.java:6476)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$ReferenceType.accept(Java.java:3928) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitType(UnitCompiler.java:6476) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitType(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$ReferenceType.accept(Java.java:3927) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$1300(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$25.getType(UnitCompiler.java:8271) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6873) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$14400(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2$1.visitFieldAccess(UnitCompiler.java:6499)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2$1.visitFieldAccess(UnitCompiler.java:6494)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$FieldAccess.accept(Java.java:4310) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6494) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6490) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$Lvalue.accept(Java.java:4148) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6490) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$Rvalue.accept(Java.java:4116) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6855) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$14200(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2$1.visitAmbiguousName(UnitCompiler.java:6497)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2$1.visitAmbiguousName(UnitCompiler.java:6494)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$AmbiguousName.accept(Java.java:4224) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6494) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6490) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$Lvalue.accept(Java.java:4148) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6490) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$Rvalue.accept(Java.java:4116) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:9026) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5062) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$9100(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4423)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4396)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5073) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4396) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5662) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:3783) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$5900(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:3762)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:3734)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5073) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3734) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2360) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$6.visitExpressionStatement(UnitCompiler.java:1494)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$6.visitExpressionStatement(UnitCompiler.java:1487)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java:2874) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1487) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1567) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3388) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1357) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1330) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:822) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:432) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:215) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:411)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:406)
 ~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1414) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:406) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:378) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:237) 
~[janino-3.0.11.jar:?]
    at 
org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:465)
 ~[janino-3.0.11.jar:?]
    at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:216) 
~[janino-3.0.11.jar:?]
    at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:207) 
~[janino-3.0.11.jar:?]
    at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:80) 
~[commons-compiler-3.0.11.jar:?]
    at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:75) 
~[commons-compiler-3.0.11.jar:?]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.doCompile(CompileUtils.java:104)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.lambda$compile$0(CompileUtils.java:92)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4864)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache.get(LocalCache.java:3962)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859)
 ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
    at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:92)
 ~[flink-table-runtime-1.16.0.jar:1.16.0]
    ... 87 more {code}
 

 

> UDFs classloading from JARs in 1.16 is broken
> ---------------------------------------------
>
>                 Key: FLINK-29890
>                 URL: https://issues.apache.org/jira/browse/FLINK-29890
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Runtime
>    Affects Versions: 1.16.0
>            Reporter: Alexander Fedulov
>            Priority: Critical
>
> 1.16 introduced a lot of changes with respect to classloading in the Table 
> API. The way UDFs could previously be loaded from JARs in 1.15 does not work 
> in 1.16 anymore - it fails with the ClassNotFound exception when UDFs are 
> used at runtime. 
> Here is a repository with a reproducible example:
> [https://github.com/afedulov/udfs-flink-1.16/blob/main/src/test/java/com/example/UDFTest.java]
>  
> It works as is (Flink 1.15.2) and fails when switching the dependencies to 
> 1.16.0.
> Here are some of the PRs that might be related to the issue:
> [https://github.com/apache/flink/pull/20001]
> [https://github.com/apache/flink/pull/19845]
> [https://github.com/apache/flink/pull/20211] (fixes a similar issue 
> introduced after classloading changes in 1.16)
>  
> It is unclear how UDFs can be loaded from JARs in 1.16.
> Ideally, this should be covered by tests and described in the documentation.



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

Reply via email to