fix: Raise if list.concat is called on a non list column#27322
Open
gab23r wants to merge 3 commits intopola-rs:mainfrom
Open
fix: Raise if list.concat is called on a non list column#27322gab23r wants to merge 3 commits intopola-rs:mainfrom
list.concat is called on a non list column#27322gab23r wants to merge 3 commits intopola-rs:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()andconcat_list()shared the same code path (ListFunction::Concat)list.concat()to require list input (and fail early on non-list columns)concat_list()must continue to accept non-list columns (it wraps them into lists)Now two different paths exists:
The Solution - Two Separate Paths:
list.concat()usesListFunction::Concatand we usemapper.ensure_is_list()...concat_list()usesFunctionExpr::ConcatList, this can takes any inputs.I used AI for all the boilerplate