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


##########
crates/iceberg/src/scan/mod.rs:
##########
@@ -239,7 +265,16 @@ impl<'a> TableScanBuilder<'a> {
                 .collect()
         });
 
-        for column_name in column_names.iter() {
+        // Track the position of the _file column if requested
+        let mut file_column_position = None;
+
+        for (index, column_name) in column_names.iter().enumerate() {
+            // Handle special reserved column "_file"
+            if column_name == RESERVED_COL_NAME_FILE_INTERNAL {
+                file_column_position = Some(index);
+                continue; // Don't add to field_ids - it's a virtual column

Review Comment:
   Before creating the arrow record batch builder, we'd have to filter out 
those virtual fields though. Therefore keeping them separate (see below).



-- 
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