Skip to content

Commit ba73c81

Browse files
authored
code clean (#4354)
1 parent 63c81fe commit ba73c81

File tree

1 file changed

+4
-5
lines changed
  • datafusion/core/src/datasource/listing

1 file changed

+4
-5
lines changed

datafusion/core/src/datasource/listing/table.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,16 +543,15 @@ impl TableProvider for ListingTable {
543543
.table_partition_cols
544544
.iter()
545545
.map(|col| {
546-
(
546+
Ok((
547547
col.0.to_owned(),
548548
self.table_schema
549-
.field_with_name(&col.0)
550-
.unwrap()
549+
.field_with_name(&col.0)?
551550
.data_type()
552551
.clone(),
553-
)
552+
))
554553
})
555-
.collect();
554+
.collect::<Result<Vec<_>>>()?;
556555

557556
// create the execution plan
558557
self.options

0 commit comments

Comments
 (0)