snuyanzin commented on PR #22717:
URL: https://github.com/apache/flink/pull/22717#issuecomment-1590918465

   ```sql
   SELECT array_concat(ARRAY[CAST(NULL AS INT)], ARRAY[1]); -- returns [NULL, 
1], this is OK
   SELECT array_concat(ARRAY[1], ARRAY[CAST(NULL AS INT)]); -- returns [1, 0], 
this is NOT OK
   ```
   this should be fixed first
   
   >so this is a java innate cast problem
   
   that's not true
   
   the issue is with your element getter
   
https://github.com/apache/flink/pull/22717/files#diff-5bd5fdffc578c878d7e04819795e9fe56751a0810d0d39fcf25dc507ac83ab03R43
   ```java
           final DataType dataType =
                   ((CollectionDataType) 
context.getCallContext().getArgumentDataTypes().get(0))
                           .getElementDataType();
   ```
   it creates getter based on first arg, and as it is shown earlier sometimes 
it behaves not as expected...
   probably for this case it's better to use output data type rather than input


-- 
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]

Reply via email to