erenavsarogullari commented on PR #20469:
URL: https://github.com/apache/datafusion/pull/20469#issuecomment-3941503978

   Spark returns `Array as (nullable = true / false)` and there are 2 
representations as follows in terms of `input array` so it returns input array 
for both cases as either `NULL` or `[NULL]`:
   **Case1:** input array is null (`array (nullable = true)`): 
   ```
   +-----------------+
   |slice(NULL, 1, 2)|
   +-----------------+
   |             NULL|
   +-----------------+
   
   root
    |-- slice(NULL, 1, 2): array (nullable = true)
    |    |-- element: void (containsNull = true)
   ```
   
   **Case2:** input array has null element (`array (nullable = false)`):
   ```
   +------------------------+
   |slice(array(NULL), 1, 2)|
   +------------------------+
   |                  [NULL]|
   +------------------------+
   
   root
    |-- slice(array(NULL), 1, 2): array (nullable = false)
    |    |-- element: void (containsNull = true)
   ```
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to