From 81885b4fe57429cb9ee356875b4ebed725a4ff18 Mon Sep 17 00:00:00 2001 From: Frederic Branczyk Date: Mon, 21 Jul 2025 10:39:11 +0200 Subject: [PATCH] arrow-schema: Remove dict_id from being required equal for merging --- arrow-schema/src/field.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arrow-schema/src/field.rs b/arrow-schema/src/field.rs index 9aa1a40f4e0d..469c930d31c7 100644 --- a/arrow-schema/src/field.rs +++ b/arrow-schema/src/field.rs @@ -695,13 +695,6 @@ impl Field { /// assert!(field.is_nullable()); /// ``` pub fn try_merge(&mut self, from: &Field) -> Result<(), ArrowError> { - #[allow(deprecated)] - if from.dict_id != self.dict_id { - return Err(ArrowError::SchemaError(format!( - "Fail to merge schema field '{}' because from dict_id = {} does not match {}", - self.name, from.dict_id, self.dict_id - ))); - } if from.dict_is_ordered != self.dict_is_ordered { return Err(ArrowError::SchemaError(format!( "Fail to merge schema field '{}' because from dict_is_ordered = {} does not match {}", @@ -840,11 +833,8 @@ impl Field { /// * self.metadata is a superset of other.metadata /// * all other fields are equal pub fn contains(&self, other: &Field) -> bool { - #[allow(deprecated)] - let matching_dict_id = self.dict_id == other.dict_id; self.name == other.name && self.data_type.contains(&other.data_type) - && matching_dict_id && self.dict_is_ordered == other.dict_is_ordered // self need to be nullable or both of them are not nullable && (self.nullable || !other.nullable)