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_where() should error when _right does not exist. #18604

Closed
2 tasks done
cmdlineluser opened this issue Sep 7, 2024 · 0 comments · Fixed by #18607
Closed
2 tasks done

.join_where() should error when _right does not exist. #18604

cmdlineluser opened this issue Sep 7, 2024 · 0 comments · Fixed by #18607
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@cmdlineluser
Copy link
Contributor

cmdlineluser commented Sep 7, 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

import polars as pl

df = pl.DataFrame({"id": [1, 2]})

df.join_where(df, pl.col("id") >= pl.col("id_right"))
# shape: (3, 2)
# ┌─────┬──────────┐
# │ id  ┆ id_right │
# │ --- ┆ ---      │
# │ i64 ┆ i64      │
# ╞═════╪══════════╡
# │ 1   ┆ 1        │
# │ 2   ┆ 1        │
# │ 2   ┆ 2        │
# └─────┴──────────┘

Log output

No response

Issue description

As per @ritchie46 on Discord - this should error as predicates refer to the tables before the join and id_right does not yet exist in this example.

Expected behavior

ColumnNotFoundError

Installed versions

main
@cmdlineluser cmdlineluser added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Sep 7, 2024
@c-peters c-peters added the accepted Ready for implementation label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants