Skip to content

fix(rust): Prevent struct.with_fields from broadcasting unit lengths that are non-scalar#26608

Open
Kevin-Patyk wants to merge 9 commits intopola-rs:mainfrom
Kevin-Patyk:fix/struct_broadcast_bug
Open

fix(rust): Prevent struct.with_fields from broadcasting unit lengths that are non-scalar#26608
Kevin-Patyk wants to merge 9 commits intopola-rs:mainfrom
Kevin-Patyk:fix/struct_broadcast_bug

Conversation

@Kevin-Patyk
Copy link
Contributor

@Kevin-Patyk Kevin-Patyk commented Feb 18, 2026

Resolves #26022.

The logic already existed for throwing an error in this exact situation, but for .with_columns() in crates/polars-mem-engine/src/executors/stack.rs, so the provided solution is nothing novel. I just had to find the right placement.

Claude Sonnet 4.5 was to help me navigate the codebase and to translate the error over to a new context.

@github-actions github-actions bot added A-dtype-struct Area: struct data type fix Bug fix rust Related to Rust Polars labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-dtype-struct Area: struct data type fix Bug fix rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

struct.with_fields broadcasts unit lengths that are non-scalar

1 participant

Comments