-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use file_name instead of path when checking for expected file extension #8265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -859,7 +859,7 @@ impl SessionContext { | |||||
// check if the file extension matches the expected extension | ||||||
for path in &table_paths { | ||||||
let file_name = path.prefix().filename().unwrap_or_default(); | ||||||
if !path.as_str().ends_with(&option_extension) && file_name.contains('.') { | ||||||
if !file_name.ends_with(&option_extension) && file_name.contains('.') { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Perhaps? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That doesn't compile for me. Perhaps this method isn't available in the version of arrow-rs that we are currently using?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
return exec_err!( | ||||||
"File '{file_name}' does not match the expected extension '{option_extension}'" | ||||||
); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check is just ill-formed, if the ListingTableUrl is to a directory containing a
.
this check will reject it. I'm not sure what this check is here for tbh...