Skip to content

Support Native Flink UNIX_TIMESTAMP Function #1863

@Tartarus0zm

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.

Metadata

Metadata

Assignees

No one assigned

    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