Class TimeFcts


  • public abstract class TimeFcts
    extends java.lang.Object
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • floorTime

        public static final NativeScalarFunction floorTime
        Function that rounds a time down to the closest multiple of a duration.
    • Constructor Detail

      • TimeFcts

        public TimeFcts()
    • Method Detail

      • addFunctionsTo

        public static void addFunctionsTo​(NativeFunctions functions)
      • toDate

        public static NativeScalarFunction toDate​(TemporalType<?> type)
        Creates a function that converts a value of the specified type into a DATE.
        Parameters:
        type - the temporal type
        Returns:
        a function that convert a value of the specified type into a DATE.
      • toTimestamp

        public static NativeScalarFunction toTimestamp​(TemporalType<?> type)
        Creates a function that converts a value of the specified type into a TIMESTAMP.
        Parameters:
        type - the temporal type
        Returns:
        a function that convert a value of the specified type into a TIMESTAMP.
      • toUnixTimestamp

        public static NativeScalarFunction toUnixTimestamp​(TemporalType<?> type)
        Creates a function that converts a value of the specified type into a UNIX timestamp.
        Parameters:
        type - the temporal type
        Returns:
        a function that convert a value of the specified type into a UNIX timestamp.