Amogh-2404 commented on code in PR #22797:
URL: https://github.com/apache/datafusion/pull/22797#discussion_r3652745753


##########
datafusion/ffi/src/udf/mod.rs:
##########
@@ -460,6 +487,19 @@ impl ScalarUDFImpl for ForeignScalarUDF {
 
         result.into()
     }
+
+    fn with_updated_config(&self, config: &ConfigOptions) -> Option<ScalarUDF> 
{
+        let config: FFI_ConfigOptions = config.into();
+
+        let result = unsafe { (self.udf.with_updated_config)(&self.udf, 
config) };
+
+        // The trait method is infallible, so a transport-level error (the 
config
+        // failing to round-trip on the provider side) degrades to `None`; the
+        // same outcome as a provider that does not specialize on config.
+        let updated = df_result!(result).ok()?.into_option()?;

Review Comment:
   Yes, I used an LLM-assisted workflow and the repository FFI skill. You are 
right: the skill missed this failure mode, and the dedicated fixture is 
unnecessary. I am cleaning up both before updating the branch.



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