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


##########
python/sedonadb/tests/test_udf.py:
##########
@@ -218,3 +218,37 @@ def questionable_udf(arg):
         match="Expected result of user-defined function to return array of 
length 1 but got 2",
     ):
         con.sql("SELECT questionable_udf(123) as col").to_pandas()
+
+
+def test_native_scalar_udf_export_import_roundtrip(con):
+    # A SedonaDB built-in scalar function exposes its native overload kernels
+    # via __sedonadb_scalar_udf__ (the export side of the plugin protocol).
+    # Exporting those capsules and rebuilding a UDF under a new name must
+    # produce a function whose output is identical to the built-in's, proving
+    # the native kernels survive a full export -> capsule -> import roundtrip.
+    from sedonadb._lib import sedona_native_scalar_udf
+
+    st_asbinary = con.funcs.st_asbinary._impl
+    assert hasattr(st_asbinary, "__sedonadb_scalar_udf__")

Review Comment:
   done



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