BlakeOrth commented on code in PR #17050:
URL: https://github.com/apache/datafusion/pull/17050#discussion_r2261130125
##########
datafusion/core/src/datasource/listing_table_factory.rs:
##########
@@ -63,16 +63,29 @@ impl TableProviderFactory for ListingTableFactory {
))?
.create(session_state, &cmd.options)?;
- let file_extension = get_extension(cmd.location.as_str());
+ let mut table_path = ListingTableUrl::parse(&cmd.location)?;
+ let file_extension = match table_path.is_collection() {
+ true => "",
+ false => &get_extension(cmd.location.as_str()),
+ };
Review Comment:
This behavior actually feels a bit odd to me, but was necessary to preserve
the existing unit tests related to building the appropriate glob pattern for
compressed (e.g. '.csv.gz') files. It seems more correct to use the default
file extension in the case one doesn't need to be set explicitly, however that
would be a small refactor and I didn't want to mix strict bug fixes with subtle
refactors without additional input from reviewers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]