Closed
Description
Is your feature request related to a problem or challenge?
Follow up on #6900. Implement array() nested version.
It seems calling array() for list return flattened list according to the comment
However, I think make_array should wrap the elements into array, the expected behavior
make_array([A,X], []) -> [[A,X], []]
,
make_array([null, Y], [Q,R,S]) -> [[null,Y],[Q,R,S]]
and
make_array([C,Z], null) -> [[C,Z], null]
Main branch:
query ?
select make_array(['A','X'], []);
----
[[A, X], ]
query ?
select make_array(make_array(null,'Y'), make_array('Q','R','S'));
----
[[, Y], [Q, R, S]]
query error DataFusion error: Optimizer rule 'simplify_expressions' failed
caused by
Internal error: failed to downcast\. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
select make_array(['C','Z'], null);
As a result, only the third case fails, the first case is acceptable but should we expected [[A, X], []]
to differentiate with null
can also be discussed
Describe the solution you'd like
Fix the third case and update the comments.
Optional: Expect the first case to return [[A, X], []]
Describe alternatives you've considered
No response
Additional context
No response