lyne7-sc commented on code in PR #22390:
URL: https://github.com/apache/datafusion/pull/22390#discussion_r3293921845


##########
datafusion/functions-nested/src/remove.rs:
##########
@@ -214,7 +229,23 @@ impl ScalarUDFImpl for ArrayRemoveN {
     }
 
     fn invoke_with_args(&self, args: ScalarFunctionArgs) -> 
Result<ColumnarValue> {
-        make_scalar_function(array_remove_n_inner)(&args.args)
+        let [list_arg, element_arg, max_arg] =
+            take_function_args(self.name(), &args.args)?;
+        let num_rows = args.number_rows;
+        let list_array = list_arg.to_array(num_rows)?;
+        let max_array = max_arg.to_array(num_rows)?;
+        let arr_n = as_int64_array(&max_array)?.values().to_vec();

Review Comment:
   Fixed now, add `is_null(i)` is checked to substitute 0 for null positions.



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