james-willis commented on code in PR #1146:
URL: https://github.com/apache/sedona-db/pull/1146#discussion_r3779783912


##########
python/sedonadb/src/context.rs:
##########
@@ -354,6 +354,23 @@ impl InternalContext {
                 .extract::<PyRasterLoaderWrapper>()?;
             self.inner.register_raster_loader(wrapper.inner);
             return Ok(());
+        } else if component.hasattr("__sedonadb_scalar_udf__")? {
+            // One function's overload kernels, each a natively-compiled kernel
+            // capsule (see import_sedona_ffi_scalar_kernel) all sharing this
+            // function's SQL name. `sedona_native_scalar_udf` imports each
+            // capsule, checks the declared names agree, and groups them into
+            // one overloaded UDF. Registration replaces any existing UDF of
+            // that name outright, mirroring the existing 
__sedonadb_internal_udf__
+            // path (not an append). Volatility is Immutable via this path; a
+            // plugin needing Volatile/Stable builds a PySedonaScalarUdf with
+            // sedona_native_scalar_udf(..., volatility=...) and returns it
+            // through __sedonadb_internal_udf__ instead.

Review Comment:
   updated



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