Class AbstractUDFRegistrar

java.lang.Object
au.csiro.pathling.sql.udf.AbstractUDFRegistrar
All Implemented Interfaces:
SparkConfigurer

public abstract class AbstractUDFRegistrar extends Object implements 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:
  • Constructor Details

    • AbstractUDFRegistrar

      public AbstractUDFRegistrar()
  • Method Details

    • configure

      public void configure(@Nonnull SparkSession spark)
      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:
      configure in interface SparkConfigurer
      Parameters:
      spark - the Spark session to configure
    • registerUDFs

      protected abstract void registerUDFs(@Nonnull AbstractUDFRegistrar.UDFRegistrar udfRegistrar)
      Override to perform the actual registration of SqlFunctionXXX instances.
      Parameters:
      udfRegistrar - the helper to use to register the UDFs.