core-udf
What it is. core-udf holds one interface, SparkUdf. It is the agreement between the engine and every function plugin: give me a name, and a way to register yourself with Spark. It contains no function of its own.
Who needs it. Plugin authors need it to write a plugin. The engine needs it to find them. Someone who only wants to use a plugin gets it automatically as a dependency.
The contract
Section titled “The contract”public interface SparkUdf { String getName(); // the name used in Spark SQL void register(SparkSession spark); // adds the function to a session}A plugin is valid when:
- it is a public class with a public no-argument constructor;
- it is listed in
META-INF/services/com.camelioflux.plugins.udf.coreudf.SparkUdf(the tool Google AutoService can write this file for you); - its name is not used by another plugin. Spark SQL ignores case, so
addandADDcollide.
How the engine uses it
Section titled “How the engine uses it”The engine loads every implementation with Java’s ServiceLoader and registers each one:
for (SparkUdf udf : ServiceLoader.load(SparkUdf.class)) { udf.register(spark);}Add it to a build
Section titled “Add it to a build”<dependency> <groupId>com.camelioflux.plugins.udf</groupId> <artifactId>core-udf</artifactId> <version>1.0.0</version></dependency>implementation("com.camelioflux.plugins.udf:core-udf:1.0.0")Versions
Section titled “Versions”| Version | Released | Javadoc | Links |
|---|---|---|---|
1.0.0latest | 2026-12-05 | This site | Maven Central · Source |
0.0.1-test1test | 2026-12-05 | javadoc.io | Maven Central · Source |
Versions marked test were used to check the release process and should not be used.
- Source: gitlab.com/camelioflux/plugins/user-defined-function-plugins/core-udf
- Build file:
pom.xml
