Copilot commented on code in PR #1116:
URL: https://github.com/apache/sedona-db/pull/1116#discussion_r3729377305


##########
rust/sedona-geoparquet/src/format.rs:
##########
@@ -692,7 +703,7 @@ fn wrap_expr_columns(
         if let Some(column) = node.as_any().downcast_ref::<Column>() {
             let index = column.index();
             let field = file_schema.field(index);
-            // Only wrap columns that have extension metadata to preserve
+            // Only wrap columns that have extension metadata
             if field.metadata().contains_key("ARROW:extension:name") {

Review Comment:
   `file_schema.field(index)` will panic if `index` is out of bounds. Given 
this code exists specifically to harden projection handling, it should avoid 
panicking and instead skip wrapping (or return an error) when the column index 
doesn't exist in the file schema.



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

Reply via email to