This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new ba73c8180 code clean (#4354)
ba73c8180 is described below
commit ba73c8180ebd874614cabc33be8cbb0d1db52518
Author: Jie Han <[email protected]>
AuthorDate: Sat Nov 26 02:42:52 2022 +0800
code clean (#4354)
---
datafusion/core/src/datasource/listing/table.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/datafusion/core/src/datasource/listing/table.rs
b/datafusion/core/src/datasource/listing/table.rs
index e3ee5f384..11b295a48 100644
--- a/datafusion/core/src/datasource/listing/table.rs
+++ b/datafusion/core/src/datasource/listing/table.rs
@@ -543,16 +543,15 @@ impl TableProvider for ListingTable {
.table_partition_cols
.iter()
.map(|col| {
- (
+ Ok((
col.0.to_owned(),
self.table_schema
- .field_with_name(&col.0)
- .unwrap()
+ .field_with_name(&col.0)?
.data_type()
.clone(),
- )
+ ))
})
- .collect();
+ .collect::<Result<Vec<_>>>()?;
// create the execution plan
self.options