Dian Fu created FLINK-38709:
-------------------------------
Summary: PythonFunction & AsyncFunction doesn't work well when
taking the recursive field of composite type as input
Key: FLINK-38709
URL: https://issues.apache.org/jira/browse/FLINK-38709
Project: Flink
Issue Type: Bug
Reporter: Dian Fu
Assignee: Dian Fu
For the following query:
{code}
SELECT func1(e.f.h) from MyTable
{code}
where the schema of MyTable is as following:
{code}
CREATE TABLE MyTable (
a int,
b bigint,
c string,
d ARRAY<INT NOT NULL>,
e ROW<f ROW<h int, i double>, g string>
) WITH (
'connector' = 'test-simple-table-source'
)
{code}
The following exception is thrown:
{code}
java.lang.AssertionError: RexInputRef index 5 out of range 0..4
at
org.apache.calcite.rex.RexProgramBuilder$RegisterInputShuttle.visitInputRef(RexProgramBuilder.java:947)
at
org.apache.calcite.rex.RexProgramBuilder$RegisterInputShuttle.visitInputRef(RexProgramBuilder.java:932)
at org.apache.calcite.rex.RexInputRef.accept(RexInputRef.java:125)
at
org.apache.calcite.rex.RexShuttle.visitFieldAccess(RexShuttle.java:203)
at
org.apache.calcite.rex.RexProgramBuilder$RegisterShuttle.visitFieldAccess(RexProgramBuilder.java:912)
at
org.apache.calcite.rex.RexProgramBuilder$RegisterShuttle.visitFieldAccess(RexProgramBuilder.java:895)
at org.apache.calcite.rex.RexFieldAccess.accept(RexFieldAccess.java:94)
at
org.apache.calcite.rex.RexProgramBuilder.registerInput(RexProgramBuilder.java:303)
at
org.apache.calcite.rex.RexProgramBuilder.addProject(RexProgramBuilder.java:213)
at org.apache.calcite.rex.RexProgram.create(RexProgram.java:235)
at
org.apache.flink.table.planner.plan.rules.logical.RemoteCorrelateSplitRule.createNewLeftCalc(RemoteCorrelateSplitRule.java:198)
at
org.apache.flink.table.planner.plan.rules.logical.RemoteCorrelateSplitRule.onMatch(RemoteCorrelateSplitRule.java:301)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)