File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -868,15 +868,13 @@ impl ArrowReader {
868868/// Returns None if the Parquet file doesn't have field IDs embedded (e.g., migrated tables).
869869fn build_field_id_map ( parquet_schema : & SchemaDescriptor ) -> Result < Option < HashMap < i32 , usize > > > {
870870 let mut column_map = HashMap :: new ( ) ;
871- let mut has_field_ids = true ;
872871
873872 for ( idx, field) in parquet_schema. columns ( ) . iter ( ) . enumerate ( ) {
874873 let field_type = field. self_type ( ) ;
875874 match field_type {
876875 ParquetType :: PrimitiveType { basic_info, .. } => {
877876 if !basic_info. has_id ( ) {
878- has_field_ids = false ;
879- break ;
877+ return Ok ( None ) ;
880878 }
881879 column_map. insert ( basic_info. id ( ) , idx) ;
882880 }
@@ -892,11 +890,7 @@ fn build_field_id_map(parquet_schema: &SchemaDescriptor) -> Result<Option<HashMa
892890 } ;
893891 }
894892
895- if !has_field_ids {
896- Ok ( None )
897- } else {
898- Ok ( Some ( column_map) )
899- }
893+ Ok ( Some ( column_map) )
900894}
901895
902896/// Build a fallback field ID map for Parquet files without embedded field IDs.
You can’t perform that action at this time.
0 commit comments