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

Yun Gao commented on FLINK-33128:
---------------------------------

Merged on master via f31770fcf5769052f1ac32a6529de979eaf339a4

> TestValuesRuntimeFunctions$TestValuesLookupFunction does not call open() on 
> converter
> -------------------------------------------------------------------------------------
>
>                 Key: FLINK-33128
>                 URL: https://issues.apache.org/jira/browse/FLINK-33128
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.16.2
>            Reporter: Jerome Gagnon
>            Assignee: Jerome Gagnon
>            Priority: Major
>              Labels: pull-request-available
>
> When using the TestValues connector with nested Row values relying on 
> BinaryArrayWriter the following exception happen : 
> {code:java}
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.flink.table.data.writer.BinaryArrayWriter.getNumElements()" 
> because "this.reuseWriter" is null
>     at 
> org.apache.flink.table.data.conversion.ArrayObjectArrayConverter.allocateWriter(ArrayObjectArrayConverter.java:140)
>     at 
> org.apache.flink.table.data.conversion.ArrayObjectArrayConverter.toBinaryArrayData(ArrayObjectArrayConverter.java:114)
>     at 
> org.apache.flink.table.data.conversion.ArrayObjectArrayConverter.toInternal(ArrayObjectArrayConverter.java:93)
>     at 
> org.apache.flink.table.data.conversion.ArrayObjectArrayConverter.toInternal(ArrayObjectArrayConverter.java:40)
>     at 
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:90)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:37)
>     at 
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:90)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:37)
>     at 
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:75)
>     at 
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:37)
>     at 
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
>     at 
> org.apache.flink.table.runtime.connector.source.DataStructureConverterWrapper.toInternal(DataStructureConverterWrapper.java:51)
>     at 
> org.apache.flink.table.planner.factories.TestValuesRuntimeFunctions$TestValuesLookupFunction.lambda$indexDataByKey$0(TestValuesRuntimeFunctions.java:626)
>     at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
>     at 
> org.apache.flink.table.planner.factories.TestValuesRuntimeFunctions$TestValuesLookupFunction.indexDataByKey(TestValuesRuntimeFunctions.java:624)
>     at 
> org.apache.flink.table.planner.factories.TestValuesRuntimeFunctions$TestValuesLookupFunction.open(TestValuesRuntimeFunctions.java:601)
>     at LookupFunction$370.open(Unknown Source)
>     at 
> org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
>     at 
> org.apache.flink.table.runtime.operators.join.lookup.LookupJoinRunner.open(LookupJoinRunner.java:67)
>     at 
> org.apache.flink.table.runtime.operators.join.lookup.LookupJoinWithCalcRunner.open(LookupJoinWithCalcRunner.java:51)
>     at 
> org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
>     at 
> org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:100)
>     at 
> org.apache.flink.streaming.api.operators.ProcessOperator.open(ProcessOperator.java:56)
>     at 
> org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:107)
>     at 
> org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:731)
>     at 
> org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.call(StreamTaskActionExecutor.java:100)
>     at 
> org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:706)
>     at 
> org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:672)
>     at 
> org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:935)
>     at 
> org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:904)
>     at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:728)
>     at org.apache.flink.runtime.taskmanager.Task.run(Task.java:550){code}
>  
> This is happening because open() is being not called from 
> TestValuesLookupFunction.open() and the underlying converter writer never 
> gets initialized.



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

Reply via email to