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

schema_overrides should raise an error on non-existing keys #11972

Closed
2 tasks done
stinodego opened this issue Oct 24, 2023 · 2 comments
Closed
2 tasks done

schema_overrides should raise an error on non-existing keys #11972

stinodego opened this issue Oct 24, 2023 · 2 comments
Labels
bug Something isn't working P-medium Priority: medium python Related to Python Polars

Comments

@stinodego
Copy link
Contributor

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({"a": [1, 2], "b": [3, 4]}, schema_overrides={"c": pl.Int8})

Log output

shape: (2, 2)
┌─────┬─────┐
│ a   ┆ b   │
│ --- ┆ --- │
│ i64 ┆ i64 │
╞═════╪═════╡
│ 1   ┆ 3   │
│ 2   ┆ 4   │
└─────┴─────┘

Issue description

Non-existing keys in schema_overrides are ignored.

Expected behavior

An ValueError should be raised.

Installed versions

main

@stinodego stinodego added bug Something isn't working python Related to Python Polars accepted Ready for implementation labels Oct 24, 2023
@github-project-automation github-project-automation bot moved this to Ready in Backlog Oct 24, 2023
@stinodego stinodego added P-medium Priority: medium and removed accepted Ready for implementation labels Jan 12, 2024
@stinodego
Copy link
Contributor Author

Related to #11723

@stinodego
Copy link
Contributor Author

We actually decided against this in the linked issue.

@stinodego stinodego closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@github-project-automation github-project-automation bot moved this from Ready to Done in Backlog Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium Priority: medium python Related to Python Polars
Projects
Archived in project
Development

No branches or pull requests

1 participant