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

   I did a bit testing
   
   here are findings
   
   1. nullable + non-nullable vs non-nullable + nullable
   ```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
   ```
   2. different types
   ```sql
   SELECT array_concat(ARRAY['2'], ARRAY['1']);      -- returns [2, 1], this is 
NOT OK 
   SELECT array_concat(ARRAY['2'], ARRAY[1]);      -- returns [2, ], this is 
NOT OK 
   ```
   3. wrong(incompatible) types
   ```sql
   SELECT array_concat(ARRAY[ARRAY[1]], ARRAY[1]); -- fails with 
ArrayIndexOutOfBoundsException
   ```
   


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