hanyuzheng7 commented on PR #22717: URL: https://github.com/apache/flink/pull/22717#issuecomment-1587886884
@snuyanzin @bvarghese1 For 2. different types and case 3.wrong(incompatible) types, if array exists null elements, I don't find a effective way to solve this problem because you can see array[array[1,2]], array[array[1, null]], their datatype are ARRAY[ARRAY<INT> NOT NULL] NOT NULL, ARRAY[ARRAY<INT> ] NOT NULL. It obviously they do not belong to same dataType, so we cannot concat them. As before, they can be concat because that I didn't check whether their dataType are same. But once you check it you will find array[array[1,2]], array[array[1, null]] belong to different dataType, so the res of concat(array[array[1,2], array[array[1, null]) should not [array[1,2], array[1, null]]. It should be null. But now, it can check the situation like array_concat(ARRAY['2'], ARRAY[1]), the res is null. Because their Datatype are different. But if you want to get this situation concat(array[array[1,2], array[array[1, null]) res: [array[1,2], array[1, null]], it become more difficult, because you want to remove all The NULL exist in the dataType. I have to use nullable way to remove all the NULL in their DataType. up to now, I can only find a way to remove outermost NULL, such as change ARRAY[ARRAY<INT> NOT NULL] NOT NULL -> ARRAY[ARRAY<INT> NOT NULL], but I cannot find a way to remove insider NULL in this version Flink. Because at the worst case if array like this -> array[array[array[array[array[....array[1,2]]]]]], up to now I cannot find a way remove insider NULL. So now I have two way to solve 2. different types and case 3.wrong(incompatible). The first way is that do not allow any null exist in the any array. The second way is to strictly specify the input type, such as array[1,2]], array[array[1, null] they belong to different dataType so the res should be null. The newest version use the second way. Do you think is ok for you? Thank you. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
