Class UnionConverter

    • Constructor Detail

      • UnionConverter

        public UnionConverter()
    • Method Detail

      • canHandle

        public boolean canHandle​(Class clazz)
        Description copied from interface: Converter
        Enables checking whether the converter can convert a particular class.
        Specified by:
        canHandle in interface Converter
        Parameters:
        clazz - the class of the object to convert
        Returns:
        boolean true if it can be handled
      • convertedType

        public org.apache.spark.sql.types.DataType convertedType()
        Description copied from interface: Converter
        Returns the DataType indicating the type of the object that results from the conversion.
        Specified by:
        convertedType in interface Converter
        Returns:
        DataType the DataType corresponding to the class that the object will be converted to.
      • convert

        public Double convert​(Object object)
                       throws ConversionException
        Description copied from interface: Converter
        Request that the Serialisation serialises some object and returns the raw bytes of the serialised form.
        Specified by:
        convert in interface Converter
        Parameters:
        object - the object to be serialised
        Returns:
        Object the converted object
        Throws:
        ConversionException - if the conversion of the object fails