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


##########
rust/sedona-functions/src/st_setsrid.rs:
##########
@@ -374,9 +402,26 @@ impl SedonaScalarKernel for SRIDifiedKernel {
                 let new_array = builder.finish();
                 return Ok(ColumnarValue::Array(Arc::new(new_array)));
             }
+
+            Ok(result)
+        } else {
+            let (item_type, _) = parse_item_crs_arg_type(return_type)?;
+            let normalized_crs_value = 
normalize_crs_array(&args[orig_args_len], None)?;
+            make_item_crs(
+                &item_type,
+                result,
+                &ColumnarValue::Array(normalized_crs_value),
+                crs_input_nulls(&args[1]),

Review Comment:
   The index used here appears incorrect. It should be `args[orig_args_len]` to 
match the CRS argument position, not `args[1]`. This hardcoded index assumes 
the CRS is always the second argument, which may not be true for all functions 
using SRIDifiedKernel.
   ```suggestion
                   crs_input_nulls(&args[orig_args_len]),
   ```



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