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

Join with empty dataframe causes a panic #19863

Closed
2 tasks done
daBlesr opened this issue Nov 19, 2024 · 0 comments · Fixed by #19896
Closed
2 tasks done

Join with empty dataframe causes a panic #19863

daBlesr opened this issue Nov 19, 2024 · 0 comments · Fixed by #19896
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@daBlesr
Copy link

daBlesr commented Nov 19, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

let right = df!("s" => Vec::<u32>::new()).unwrap();
let left =  df!("s" => vec![1u32, 2u32, 3u32]).unwrap();

let df = left
    .clone()
    .lazy()
    .join(
        right
            .clone()
            .lazy()
            .with_column(lit(true).alias("p")),
        [col("s")],
        [col("s")],
        JoinArgs {
            how: JoinType::Left,
            ..Default::default()
        }
    );
println!("{:?}", df.collect());

Log output

'polars-4' panicked at /polars/crates/polars-core/src/frame/column/scalar.rs:141:9:
assertion failed: !series.is_empty() || length == 0

Issue description

Very recently introduced bug, it works on the commit with tag 0.44.2, but not on latest commit.

Expected behavior

It should be able to do the left join, and show the added column p with null values.

Installed versions

default-features = false, features = ["lazy"]
@daBlesr daBlesr added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant