Class UDTRegistration

Object
org.apache.spark.sql.types.UDTRegistration

public class UDTRegistration extends Object
This object keeps the mappings between user classes and their User Defined Types (UDTs). Previously we use the annotation SQLUserDefinedType to register UDTs for user classes. However, by doing this, we add SparkSQL dependency on user classes. This object provides alternative approach to register UDTs for user classes.
  • Constructor Details

    • UDTRegistration

      public UDTRegistration()
  • Method Details

    • exists

      public static boolean exists(String userClassName)
      Queries if a given user class is already registered or not.
      Parameters:
      userClassName - the name of user class
      Returns:
      boolean value indicates if the given user class is registered or not
    • register

      public static void register(String userClass, String udtClass)
      Registers an UserDefinedType to an user class. If the user class is already registered with another UserDefinedType, warning log message will be shown.
      Parameters:
      userClass - the name of user class
      udtClass - the name of UserDefinedType class for the given userClass
    • getUDTFor

      public static scala.Option<Class<?>> getUDTFor(String userClass)
      Returns the Class of UserDefinedType for the name of a given user class.
      Parameters:
      userClass - class name of user class
      Returns:
      Option value of the Class object of UserDefinedType
    • org$apache$spark$internal$Logging$$log_

      public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
    • org$apache$spark$internal$Logging$$log__$eq

      public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)