Skip to content

fix: Raise if list.concat is called on a non list column#27322

Open
gab23r wants to merge 3 commits intopola-rs:mainfrom
gab23r:fix_25649_concat
Open

fix: Raise if list.concat is called on a non list column#27322
gab23r wants to merge 3 commits intopola-rs:mainfrom
gab23r:fix_25649_concat

Conversation

@gab23r
Copy link
Copy Markdown
Contributor

@gab23r gab23r commented Apr 15, 2026

Closes the concat part of #25649
list.concat() wasn't ensuring the input was a list. This is fixed.

Why the PR is more complicated:

  • list.concat() and concat_list() shared the same code path (ListFunction::Concat)
  • We needed list.concat() to require list input (and fail early on non-list columns)
  • But concat_list() must continue to accept non-list columns (it wraps them into lists)

Now two different paths exists:

The Solution - Two Separate Paths:

  1. *list.concat() uses ListFunction::Concat and we use mapper.ensure_is_list()...
  2. concat_list()uses FunctionExpr::ConcatList, this can takes any inputs.

I used AI for all the boilerplate

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Apr 15, 2026
@github-actions github-actions bot added the changes-dsl Do not merge if this label is present and red. label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes-dsl Do not merge if this label is present and red. fix Bug fix python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant