datafusion
datafusion copied to clipboard
add 'unnest' table function
Is your feature request related to a problem or challenge?
the 'unnest' table function reads an array or list, and out put a table
Describe the solution you'd like
the result is same as that of postgresql
select unnest(ARRAY[1,2,3]);
unnest
--------
1
2
3
select * from unnest(ARRAY[1,2,3]);
unnest
--------
1
2
3
Describe alternatives you've considered
No response
Additional context
No response
I think it is duplicated issue from #6555 btw, first example is implemented
when will the function available?
first one should be available now. second one it not planned
take
Unnest seems to be recognized as a TableFactor in sqlparser-rs, and implementing support for it in DataFusion might be straightforward.
I'll work on this issue after PR #9342.