File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
datafusion/core/src/execution/context Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -858,8 +858,8 @@ impl SessionContext {
858858
859859 // check if the file extension matches the expected extension
860860 for path in & table_paths {
861- if ! path. as_str ( ) . ends_with ( & option_extension ) {
862- let file_name = path. prefix ( ) . filename ( ) . unwrap_or_default ( ) ;
861+ let file_name = path. prefix ( ) . filename ( ) . unwrap_or_default ( ) ;
862+ if ! path. as_str ( ) . ends_with ( & option_extension ) && file_name . contains ( "." ) {
863863 return exec_err ! (
864864 "File '{file_name}' does not match the expected extension '{option_extension}'"
865865 ) ;
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ mod tests {
138138 }
139139
140140 #[ tokio:: test]
141- async fn read_from_wrong_file_extension ( ) -> Result < ( ) > {
141+ async fn read_from_different_file_extension ( ) -> Result < ( ) > {
142142 let ctx = SessionContext :: new ( ) ;
143143
144144 // Make up a new dataframe.
You can’t perform that action at this time.
0 commit comments