Class TypeConversion.DateConversion

  • All Implemented Interfaces:
    TypeConversion<java.time.LocalDate>
    Enclosing interface:
    TypeConversion<T>

    public static class TypeConversion.DateConversion
    extends java.lang.Object
    implements TypeConversion<java.time.LocalDate>
    Converts date value in Integer to LocalDate. The date value represents epoch days.
    • Constructor Detail

      • DateConversion

        public DateConversion()
    • Method Detail

      • convert

        public java.time.LocalDate convert​(org.apache.avro.Schema fieldSchema,
                                           @NotNull
                                           java.lang.Object fieldValue)
        Description copied from interface: TypeConversion
        Convert value from the source type to the target type. Runtime exceptions are thrown on invalid argument or conversion failure.
        Specified by:
        convert in interface TypeConversion<java.time.LocalDate>
        Parameters:
        fieldSchema - avro schema to loop up the source schema
        fieldValue - value in the source type. The value cannot be null.
        Returns:
        the converted value