Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatten should be single-step, not recursive #13757

Open
findepi opened this issue Dec 13, 2024 · 2 comments
Open

flatten should be single-step, not recursive #13757

findepi opened this issue Dec 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Dec 13, 2024

Describe the bug

per #13706 the list functions are modeled after DuckDB1

per https://duckdb.org/docs/sql/functions/list.html#flattenlist_of_lists, flatten should flatten one level, not recursive

To Reproduce

query ???
select flatten(arrow_cast(make_array([[1.1]], [[2.2]], [[3.3], [4.4]]), 'LargeList(LargeList(LargeList(Float64)))'));
----
[1.1, 2.2, 3.3, 4.4]

Expected behavior

query ???
select flatten(arrow_cast(make_array([[1.1]], [[2.2]], [[3.3], [4.4]]), 'LargeList(LargeList(LargeList(Float64)))'));
----
[[1.1], [2.2], [3.3], [4.4]]

Additional context

No response

Footnotes

  1. i would prefer a more established point of reference with close alignment to the SQL standard, but this issue is not about this

@findepi findepi added the bug Something isn't working label Dec 13, 2024
@buraksenn
Copy link
Contributor

I want to work on this but saw a related work in the #13756 should I wait or simply convert flattern func to flatten one level instead of recursion?

@findepi
Copy link
Member Author

findepi commented Dec 17, 2024

You don't need to wait, but you can. We should expect some conflicts, someone will have to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants