Class TemporalFunctions
- java.lang.Object
-
- org.apache.flink.cdc.runtime.functions.impl.TemporalFunctions
-
public class TemporalFunctions extends Object
Temporal built-in functions.
-
-
Constructor Summary
Constructors Constructor Description TemporalFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.time.LocalDatecurrentDate(long epochTime, String timezone)static java.time.LocalTimecurrentTime(long epochTime, String timezone)static java.time.InstantcurrentTimestamp(long epochTime)static StringdateAdd(String timestamp, int days, String timezone)static StringdateAdd(java.time.Instant timestamp, int days, String timezone)static StringdateAdd(java.time.LocalDate timestamp, int days, String timezone)static StringdateAdd(java.time.LocalDateTime timestamp, int days, String timezone)static StringdateFormat(java.time.Instant timestamp, String format, String timezone)static StringdateFormat(java.time.LocalDate date, String format, String timezone)static StringdateFormat(java.time.LocalDateTime timestamp, String format, String timezone)static StringdateFormat(java.time.LocalTime time, String format, String timezone)static StringdateFormatTz(java.time.Instant timestamp, String timezone)static StringdateFormatTz(java.time.Instant timestamp, String format, String timezone)static StringdateFormatTz(java.time.LocalDateTime timestamp, String timezone)static StringdateFormatTz(java.time.LocalDateTime timestamp, String format, String timezone)static Longextract(String unit, java.time.temporal.TemporalAccessor temporal, String timezone)static StringfromUnixtime(Integer seconds, String timezone)static StringfromUnixtime(Integer seconds, String format, String timezone)static StringfromUnixtime(Long seconds, String timezone)static StringfromUnixtime(Long seconds, String format, String timezone)static java.time.LocalTimelocaltime(long epochTime, String timezone)static java.time.LocalDateTimelocaltimestamp(long epochTime, String timezone)static java.time.Instantnow(long epochTime)static java.time.InstanttemporalPlusMillis(java.time.Instant temporal, long millis)static java.time.LocalDatetemporalPlusMillis(java.time.LocalDate temporal, long millis)static java.time.LocalDateTimetemporalPlusMillis(java.time.LocalDateTime temporal, long millis)static java.time.LocalTimetemporalPlusMillis(java.time.LocalTime temporal, long millis)static java.time.InstanttemporalPlusMonths(java.time.Instant temporal, long months)static java.time.LocalDatetemporalPlusMonths(java.time.LocalDate temporal, long months)static java.time.LocalDateTimetemporalPlusMonths(java.time.LocalDateTime temporal, long months)static java.time.LocalTimetemporalPlusMonths(java.time.LocalTime temporal, long months)static java.time.Instanttimestampadd(String timeIntervalUnit, Integer interval, java.time.Instant timePoint, String timezone)static java.time.LocalDateTimetimestampadd(String timeIntervalUnit, Integer interval, java.time.LocalDateTime timePoint, String timezone)static Integertimestampdiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.Instant toTimestamp, String timezone)static Integertimestampdiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)static Integertimestampdiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.Instant toTimestamp, String timezone)static Integertimestampdiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)static IntegertimestampDiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.Instant toTimestamp, String timezone)static IntegertimestampDiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)static IntegertimestampDiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.Instant toTimestamp, String timezone)static IntegertimestampDiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)static java.time.LocalDatetoDate(String str)static java.time.LocalDatetoDate(String str, String format)static java.time.LocalDatetoDate(java.time.Instant instant)static java.time.LocalDatetoDate(java.time.LocalDateTime localDateTime)static java.time.LocalDatetoDate(java.time.ZonedDateTime zonedDateTime)static java.time.LocalDateTimetoTimestamp(String str, String timezone)static java.time.LocalDateTimetoTimestamp(String str, String format, String timezone)static java.time.InstanttoTimestampLtz(Long epochMillis)static java.time.InstanttoTimestampLtz(Long timestamp, Integer precision)static java.time.InstanttoTimestampLtz(String timestamp)static java.time.InstanttoTimestampLtz(String timestamp, String format)static java.time.InstanttoTimestampLtz(String timestamp, String format, String zoneId)static longunixTimestamp(long epochTime, String timezone)static longunixTimestamp(String dateTimeStr, long epochTime, String timezone)static longunixTimestamp(String dateTimeStr, String format, long epochTime, String timezone)
-
-
-
Method Detail
-
currentTimestamp
public static java.time.Instant currentTimestamp(long epochTime)
-
now
public static java.time.Instant now(long epochTime)
-
localtimestamp
public static java.time.LocalDateTime localtimestamp(long epochTime, String timezone)
-
localtime
public static java.time.LocalTime localtime(long epochTime, String timezone)
-
currentTime
public static java.time.LocalTime currentTime(long epochTime, String timezone)
-
currentDate
public static java.time.LocalDate currentDate(long epochTime, String timezone)
-
extract
public static Long extract(String unit, java.time.temporal.TemporalAccessor temporal, String timezone)
-
temporalPlusMonths
public static java.time.LocalDate temporalPlusMonths(java.time.LocalDate temporal, long months)
-
temporalPlusMonths
public static java.time.LocalTime temporalPlusMonths(java.time.LocalTime temporal, long months)
-
temporalPlusMonths
public static java.time.LocalDateTime temporalPlusMonths(java.time.LocalDateTime temporal, long months)
-
temporalPlusMonths
public static java.time.Instant temporalPlusMonths(java.time.Instant temporal, long months)
-
temporalPlusMillis
public static java.time.LocalDate temporalPlusMillis(java.time.LocalDate temporal, long millis)
-
temporalPlusMillis
public static java.time.LocalTime temporalPlusMillis(java.time.LocalTime temporal, long millis)
-
temporalPlusMillis
public static java.time.LocalDateTime temporalPlusMillis(java.time.LocalDateTime temporal, long millis)
-
temporalPlusMillis
public static java.time.Instant temporalPlusMillis(java.time.Instant temporal, long millis)
-
unixTimestamp
public static long unixTimestamp(long epochTime, String timezone)
-
unixTimestamp
public static long unixTimestamp(String dateTimeStr, long epochTime, String timezone)
-
unixTimestamp
public static long unixTimestamp(String dateTimeStr, String format, long epochTime, String timezone)
-
dateFormat
public static String dateFormat(java.time.Instant timestamp, String format, String timezone)
-
dateFormat
public static String dateFormat(java.time.LocalDateTime timestamp, String format, String timezone)
-
dateFormat
public static String dateFormat(java.time.LocalDate date, String format, String timezone)
-
dateFormat
public static String dateFormat(java.time.LocalTime time, String format, String timezone)
-
toDate
public static java.time.LocalDate toDate(String str)
-
toDate
public static java.time.LocalDate toDate(java.time.LocalDateTime localDateTime)
-
toDate
public static java.time.LocalDate toDate(java.time.ZonedDateTime zonedDateTime)
-
toDate
public static java.time.LocalDate toDate(java.time.Instant instant)
-
toTimestamp
public static java.time.LocalDateTime toTimestamp(String str, String format, String timezone)
-
timestampDiff
public static Integer timestampDiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)
-
timestampDiff
public static Integer timestampDiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.Instant toTimestamp, String timezone)
-
timestampDiff
public static Integer timestampDiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)
-
timestampDiff
public static Integer timestampDiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.Instant toTimestamp, String timezone)
-
timestampdiff
public static Integer timestampdiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)
-
timestampdiff
public static Integer timestampdiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.Instant toTimestamp, String timezone)
-
timestampdiff
public static Integer timestampdiff(String timeIntervalUnit, java.time.Instant fromTimestamp, java.time.LocalDateTime toTimestamp, String timezone)
-
timestampdiff
public static Integer timestampdiff(String timeIntervalUnit, java.time.LocalDateTime fromTimestamp, java.time.Instant toTimestamp, String timezone)
-
timestampadd
public static java.time.LocalDateTime timestampadd(String timeIntervalUnit, Integer interval, java.time.LocalDateTime timePoint, String timezone)
-
timestampadd
public static java.time.Instant timestampadd(String timeIntervalUnit, Integer interval, java.time.Instant timePoint, String timezone)
-
toTimestampLtz
public static java.time.Instant toTimestampLtz(Long epochMillis)
-
toTimestampLtz
public static java.time.Instant toTimestampLtz(String timestamp)
-
toTimestampLtz
public static java.time.Instant toTimestampLtz(String timestamp, String format, String zoneId)
-
dateFormatTz
public static String dateFormatTz(java.time.LocalDateTime timestamp, String format, String timezone)
-
dateFormatTz
public static String dateFormatTz(java.time.Instant timestamp, String format, String timezone)
-
-