cj-zhukov commented on code in PR #14168:
URL: https://github.com/apache/datafusion/pull/14168#discussion_r1920985877
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1379,6 +1379,29 @@ impl SessionContext {
Ok(())
}
+ fn register_type_check<P: DataFilePaths>(
+ &self,
+ table_paths: P,
+ extension: impl AsRef<str>,
+ ) -> Result<()> {
+ let table_paths = table_paths.to_urls()?;
+ if table_paths.is_empty() {
Review Comment:
Thanks for this good point! I checked this. If folder contains mixed format
files, that will not error trigger!
I agree that if it failed, it would not be expected behavior. This code
helps to prevent this. I found it in _read_type
(https://docs.rs/datafusion/latest/src/datafusion/execution/context/mod.rs.html#1261)
```rust
if !file_path.ends_with(extension) && !path.is_collection() {
return exec_err!(
"File path '{file_path}' does not match the expected extension
'{extension}'"
);
}
```
--
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]