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

fix: don't see files as hive partitions #14128

Merged
merged 2 commits into from
Jan 31, 2024
Merged

fix: don't see files as hive partitions #14128

merged 2 commits into from
Jan 31, 2024

Conversation

ritchie46
Copy link
Member

@ritchie46 ritchie46 commented Jan 31, 2024

closes #14125

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 31, 2024
@ritchie46 ritchie46 merged commit 504bfeb into main Jan 31, 2024
17 checks passed
@ritchie46 ritchie46 deleted the hive branch January 31, 2024 13:07
@@ -47,6 +47,16 @@ impl HivePartitions {
let name = it.next()?;
let value = it.next()?;

// Don't see files `foo=1.parquet` as hive partitions.
// So we return globs and paths with extensions.
if value.contains('*') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant to put a "." here because it still picks up foo as a hive partition. That said, it's probably better to treat the last split as the file rather than trying to decide it's a file by its name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra column when file_name contains an "=" sign, after write_parquet and read_parquet
2 participants