alamb commented on code in PR #7972:
URL: https://github.com/apache/arrow-datafusion/pull/7972#discussion_r1380727422
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -849,6 +859,28 @@ impl SessionContext {
let table_paths = table_paths.to_urls()?;
let session_config = self.copied_config();
let listing_options = options.to_listing_options(&session_config);
+
+ let option_extension = listing_options.file_extension.clone();
Review Comment:
I am pretty confused about this implementation. If the goal is to detect
files that don't end with the expected extension, can't we just do something
like
```rust
for path in &table_paths {
if !path.as_str().ends_with(&extension) {
return exec_err!(
"File '{path}' does not match the expected extension
'{extension}'"
);
}
}
```
##########
datafusion/core/src/execution/context/parquet.rs:
##########
@@ -132,6 +137,78 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn read_from_wrong_file_extentnion() -> Result<()> {
Review Comment:
```suggestion
async fn read_from_wrong_file_extension() -> Result<()> {
```
--
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]