gbrgr commented on code in PR #1824:
URL: https://github.com/apache/iceberg-rust/pull/1824#discussion_r2580794883


##########
crates/iceberg/src/metadata_columns.rs:
##########
@@ -37,40 +35,52 @@ pub const RESERVED_FIELD_ID_FILE: i32 = i32::MAX - 1;
 /// Reserved column name for the file path metadata column
 pub const RESERVED_COL_NAME_FILE: &str = "_file";
 
-/// Lazy-initialized Arrow Field definition for the _file metadata column.
-/// Uses Run-End Encoding for memory efficiency.
-static FILE_FIELD: Lazy<Arc<Field>> = Lazy::new(|| {
-    let run_ends_field = Arc::new(Field::new("run_ends", DataType::Int32, 
false));
-    let values_field = Arc::new(Field::new("values", DataType::Utf8, true));
-    Arc::new(
-        Field::new(
-            RESERVED_COL_NAME_FILE,
-            DataType::RunEndEncoded(run_ends_field, values_field),
-            false,
-        )
-        .with_metadata(HashMap::from([(
-            PARQUET_FIELD_ID_META_KEY.to_string(),
-            RESERVED_FIELD_ID_FILE.to_string(),
-        )])),
-    )
+/// Lazy-initialized Iceberg field definition for the _file metadata column.
+/// This field represents the file path as a required string field.
+static FILE_FIELD: Lazy<NestedFieldRef> = Lazy::new(|| {
+    Arc::new(NestedField::required(
+        RESERVED_FIELD_ID_FILE,
+        RESERVED_COL_NAME_FILE,
+        Type::Primitive(PrimitiveType::String),
+    ))
 });
 
-/// Returns the Arrow Field definition for the _file metadata column.
+/// Returns the Iceberg field definition for the _file metadata column.
 ///
 /// # Returns
-/// A reference to the _file field definition (RunEndEncoded type)
-pub fn file_field() -> &'static Arc<Field> {
+/// A reference to the _file field definition as an Iceberg NestedField
+pub fn file_field() -> &'static NestedFieldRef {
     &FILE_FIELD
 }
 
-/// Returns the Arrow Field definition for a metadata field ID.
+/// Extracts the primitive type from a metadata field.
+///
+/// # Arguments
+/// * `field` - The metadata field
+///
+/// # Returns
+/// The PrimitiveType of the field, or an error if the field is not a 
primitive type
+pub fn metadata_field_primitive_type(field: &NestedFieldRef) -> 
Result<PrimitiveType> {

Review Comment:
   Removed this method as not needed anymore



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to