izveigor commented on PR #6662:
URL:
https://github.com/apache/arrow-datafusion/pull/6662#issuecomment-1604650455
Hello, @alamb!
I am well aware of your arguments about NULL handling in arrays and
initially agreed with it.
But I found a serious problem that only initial approach can solve.
As you know arrays in PostgreSQL and other SQL database are not data types
for arithmetic operations.
They are rather data types that help you look up information and form new
columns.
For example, if we want to create table with `unnest` function (which I hope
will soon be implemented in Arrow Datafusion)
```
postgres=# SELECT * FROM
unnest(
ARRAY[1, 2, 3, 4, 5],
ARRAY['Ringo', 'George', 'Paul', 'John', NULL],
ARRAY[29, 27, 27, 29, NULL]
) AS data(id,name,age);
id | name | age
----+--------+-----
1 | Ringo | 29
2 | George | 27
3 | Paul | 27
4 | John | 29
5 | |
(5 rows)
```
Or find the information:
```
postgres=# SELECT array_positions(array[1, 2, 3, 4, 5], 1);
array_positions
-----------------
{1}
(1 row)
```
As I know we can create column with NULLS values.
So, I think NULLS must exist in their usual understanding (without casting
and passes).
I hope I explained well.
What do you think?
--
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]