Skip to content

Fix flatten scalar function when inner list is FixedSizeList #15898

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

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

gstvg
Copy link
Contributor

@gstvg gstvg commented Apr 30, 2025

Which issue does this PR close?

Rationale for this change

After #15149, flatten stopped working for List(FixedSizeList) because it expected the inner fixed size list to be casted to list, which wasn't happening anymore.

Looking back, #15160 correctly stopped using ArrayFunctionSignature::RecursiveArray, which I expected would make only the top level list be coerced, and it would break, but it didn't. It appears that recursive lists continued to be coerced

And then #15149 refactored that code path with the correct behavior, exposing the issue in flatten

What changes are included in this PR?

If the inner value is a fixed size list, it get's coerced to list

Are these changes tested?

Currently broken tests now pass

Are there any user-facing changes?

Broken path now works

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick action @gstvg -- this looks good to me and the Ci has all passed.

Also thank you @berkaysynnada and @joroKr21 for the quick action

@alamb alamb merged commit a50a525 into apache:main Apr 30, 2025
33 checks passed
nirnayroy pushed a commit to nirnayroy/datafusion that referenced this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main is broken
2 participants