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

Aitozi commented on FLINK-31835:
--------------------------------

[~jark] The PR have passed the CI and I think the current solution will not 
cause compatibility problem by only fix the conversion class according to the 
nullability when creating CollectionDataType, could you help review that ?

> DataTypeHint don't support Row<i Array<int>>
> --------------------------------------------
>
>                 Key: FLINK-31835
>                 URL: https://issues.apache.org/jira/browse/FLINK-31835
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.15.4
>            Reporter: jeff-zou
>            Priority: Major
>              Labels: pull-request-available
>
> Using DataTypeHint("Row<t ARRAY<INT>>") in a UDF gives the following error:
>  
> {code:java}
> Caused by: java.lang.ClassCastException: class [I cannot be cast to class 
> [Ljava.lang.Object; ([I and [Ljava.lang.Object; are in module java.base of 
> loader 'bootstrap')
> org.apache.flink.table.data.conversion.ArrayObjectArrayConverter.toInternal(ArrayObjectArrayConverter.java:40)
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:75)
> org.apache.flink.table.data.conversion.RowRowConverter.toInternal(RowRowConverter.java:37)
> org.apache.flink.table.data.conversion.DataStructureConverter.toInternalOrNull(DataStructureConverter.java:61)
> StreamExecCalc$251.processElement_split9(Unknown Source)
> StreamExecCalc$251.processElement(Unknown Source)
> org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)
>  {code}
>  
> The function is as follows:
> {code:java}
> @DataTypeHint("Row<t ARRAY<INT>>")
> public Row eval() {
> int[] i = new int[3];
> return Row.of(i);
> } {code}
>  
> This error is not reported when testing other simple types, so it is not an 
> environmental problem.



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

Reply via email to