Package au.csiro.pathling.sql.udf
Class AbstractUDFRegistrar
java.lang.Object
au.csiro.pathling.sql.udf.AbstractUDFRegistrar
- All Implemented Interfaces:
SparkConfigurer
A base Spark configurer that registers user-defined functions (UDFs) in Spark sessions.
This abstract class provides a standardised way to register SQL functions with Spark sessions.
Subclasses should implement the registerUDFs(UDFRegistrar) method to define which
functions to register.
The class implements the SparkConfigurer interface, allowing it to be used as part of
the Spark session configuration process.
- Author:
- Piotr Szul, John Grimes
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA helper class for registering user-defined functions with a Spark session. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(SparkSession spark) Configures the Spark session by registering user-defined functions.protected abstract voidregisterUDFs(AbstractUDFRegistrar.UDFRegistrar udfRegistrar) Override to perform the actual registration of SqlFunctionXXX instances.
-
Constructor Details
-
AbstractUDFRegistrar
public AbstractUDFRegistrar()
-
-
Method Details
-
configure
Configures the Spark session by registering user-defined functions.This method is called as part of the Spark session configuration process and delegates to the abstract
registerUDFs(UDFRegistrar)method to perform the actual function registration.- Specified by:
configurein interfaceSparkConfigurer- Parameters:
spark- the Spark session to configure
-
registerUDFs
Override to perform the actual registration of SqlFunctionXXX instances.- Parameters:
udfRegistrar- the helper to use to register the UDFs.
-