Skip to content

Commit

Permalink
fix: directories to dir_entries in catalog example
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuliquan committed Dec 23, 2024
1 parent 84d704a commit 352479e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion-examples/examples/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ impl DirSchema {
async fn create(state: &SessionState, opts: DirSchemaOpts<'_>) -> Result<Arc<Self>> {
let DirSchemaOpts { ext, dir, format } = opts;
let mut tables = HashMap::new();
let directories = std::fs::read_dir(dir).unwrap();
for res in directories {
let dir_entries = std::fs::read_dir(dir).unwrap();
for res in dir_entries {
let entry = res.unwrap();
let filename = entry.file_name().to_str().unwrap().to_string();
if !filename.ends_with(ext) {
Expand Down

0 comments on commit 352479e

Please sign in to comment.