Skip to content

Conversation

@Weijun-H
Copy link
Member

Which issue does this PR close?

Follow #8265

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

let file_path = path.as_str();
if (!file_path.ends_with(option_extension.clone().as_str())
&& !path.is_collection())
|| (!file_path.ends_with((option_extension.clone() + "/").as_str())
Copy link
Member

Choose a reason for hiding this comment

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

The path separator here is platform-specific.

Copy link
Member

Choose a reason for hiding this comment

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

You could use std::path::MAIN_SEPARATOR instead here

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @Weijun-H for a quick turnaround. Please add a test for double dots

bbb..bbb/filename.parquet

Ok(())
}

#[cfg(not(target_family = "windows"))]
Copy link
Member Author

@Weijun-H Weijun-H Nov 20, 2023

Choose a reason for hiding this comment

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

extend to all platforms

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @Weijun-H

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @Weijun-H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants