You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2022/11/25 18:42:57 UTC

[arrow-datafusion] branch master updated: code clean (#4354)

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 <11...@users.noreply.github.com>
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