[ https://issues.apache.org/jira/browse/FLINK-33547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17789311#comment-17789311 ]
Xingcan Cui commented on FLINK-33547: ------------------------------------- Hi [~jeyhun] , thanks for your attention! What you explained makes sense. However, sometimes it's tricky to deal with primitive array parameters. They make it harder for users to write generic UDFs, e.g., one that takes an arbitrary array and returns the first 3 elements. Also, this is a breaking change in 1.18.0. All the old UDFs using Object[] as arguments before can't directly work for primitive arrays generated from ARRAY functions now. Type inference and dealing with null values are challenging in Flink SQL. Users won't understand why a UDF accepting an ARRAY<INT> argument can't work for an ARRAY<INT NOT NULL> parameter. It's also impossible for UDF developers to code a bunch of functions taking different primitive arrays. We need some changes here. > SQL primitive array type after upgrading to Flink 1.18.0 > -------------------------------------------------------- > > Key: FLINK-33547 > URL: https://issues.apache.org/jira/browse/FLINK-33547 > Project: Flink > Issue Type: Technical Debt > Components: Table SQL / Runtime > Affects Versions: 1.18.0 > Reporter: Xingcan Cui > Priority: Major > > We have some Flink SQL UDFs that use object array (Object[]) arguments and > take boxed arrays (e.g., Float[]) as parameters. After upgrading to Flink > 1.18.0, the data created by ARRAY[] SQL function became primitive arrays > (e.g., float[]) and it caused argument mismatch issues. I'm not sure if it's > expected. -- This message was sent by Atlassian Jira (v8.20.10#820010)