You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Timo Walther (Jira)" <ji...@apache.org> on 2022/08/18 13:02:00 UTC
[jira] [Created] (FLINK-29035) ExpressionReducer does not work with jar resources
Timo Walther created FLINK-29035:
------------------------------------
Summary: ExpressionReducer does not work with jar resources
Key: FLINK-29035
URL: https://issues.apache.org/jira/browse/FLINK-29035
Project: Flink
Issue Type: Sub-task
Components: Table SQL / Planner
Reporter: Timo Walther
It seems the code generation for expression reduction uses an invalid class loader that does not contain the jar resource.
Reproducible example:
{code}
CREATE TEMPORARY SYSTEM FUNCTION myLower AS '%s' USING JAR '%s'
SELECT myLower('HELLO')
{code}
fails with
{code}
java.lang.RuntimeException: Could not instantiate generated class 'ExpressionReducer$4'
at org.apache.flink.table.runtime.generated.GeneratedClass.newInstance(GeneratedClass.java:74)
at org.apache.flink.table.planner.codegen.ExpressionReducer.reduce(ExpressionReducer.scala:97)
at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal(ReduceExpressionsRule.java:759)
at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:699)
at org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(ReduceExpressionsRule.java:306)
Caused by: org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled. This is a bug. Please file an issue.
Caused by: org.codehaus.commons.compiler.CompileException: Line 13, Column 37: Cannot determine simple type name "LowerUDF46"
at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12211)
at org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6833)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)