Skip to content

Support Native Flink UNIX_TIMESTAMP Function #1863

Description

@Tartarus0zm

The Flink UNIX_TIMESTAMP UDF is a commonly used user-defined function.
UNIX_TIMESTAMP has multiple usage methods.

  • 0 inputs:Gets current Unix timestamp in seconds. This function is not deterministic which means the value would be recalculated for each record.
  • 1 inputs:Converts a date time string string1 with default format 'yyyy-MM-dd HH:mm:ss' to Unix timestamp (in seconds).
  • 2 inputs:Converts a date time string string1 with format string2 to Unix timestamp (in seconds).

Notes: In Java, the date format is 'yyyy-MM-dd HH:mm:ss', but in Rust it is '%Y-%m-%d %H:%M:%S', to ensure compatibility with Flink scenarios, we need to convert the format.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions