This is an automated email from the ASF dual-hosted git repository.

mbrobbel pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new ae064b9385 fix: use default field name when name is None in Field 
conversion (#8557)
ae064b9385 is described below

commit ae064b9385bf5374e992a5fb4ba1d9cf8b488325
Author: Alex Huang <[email protected]>
AuthorDate: Mon Oct 6 13:31:51 2025 +0300

    fix: use default field name when name is None in Field conversion (#8557)
    
    # Which issue does this PR close?
    
    - Closes #6415
    
    # Rationale for this change
    Previously, converting an IPC Field with a `None` name could cause a
    panic. This update ensures that a default field name is used in such
    cases.
    
    # What changes are included in this PR?
    
    
    # Are these changes tested?
    
    # Are there any user-facing changes?
    No
---
 arrow-ipc/src/convert.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arrow-ipc/src/convert.rs b/arrow-ipc/src/convert.rs
index 24beb1f83a..a5139e5f21 100644
--- a/arrow-ipc/src/convert.rs
+++ b/arrow-ipc/src/convert.rs
@@ -165,7 +165,7 @@ impl From<crate::Field<'_>> for Field {
         let arrow_field = if let Some(dictionary) = field.dictionary() {
             #[allow(deprecated)]
             Field::new_dict(
-                field.name().unwrap(),
+                field.name().unwrap_or_default(),
                 get_data_type(field, true),
                 field.nullable(),
                 dictionary.id(),
@@ -173,7 +173,7 @@ impl From<crate::Field<'_>> for Field {
             )
         } else {
             Field::new(
-                field.name().unwrap(),
+                field.name().unwrap_or_default(),
                 get_data_type(field, true),
                 field.nullable(),
             )

Reply via email to