Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cdc] Time related computed functions support to handle epoch time #2989

Merged
merged 10 commits into from
Mar 12, 2024

Conversation

yuzelin
Copy link
Contributor

@yuzelin yuzelin commented Mar 11, 2024

Purpose

Current time expressions can only handle DATE and TIMESTAMP.
This PR aims to support handle numeric value as epoch time.

Tests

API and Format

For example:

  1. year: year(epoch_col) year(epoch_col, time-unit)
  2. date_format: date_format(epoch_col, yyyy-MM-dd) date_format(epoch_col, yyyy-MM-dd, time-unit)
    time-unit: second (default), millis, micros, nanos

Documentation

CDC Ingestion -> Computed Functions

@yuzelin yuzelin changed the title [cdc] Time related expressions supports to handle epoch time [cdc] Time related computed functions support to handle epoch time Mar 11, 2024
Copy link
Contributor

@zhuangchong zhuangchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

</thead>
<tbody>
<tr>
<td><h5>year(time-column [, time-unit])</h5></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you find some other systems to refer to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to Flink TO_TIMESTAMP_LTZ(numeric, precision), using precision as argument.

Temporal Functions

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit 8f8091f into apache:master Mar 12, 2024
8 of 10 checks passed
@yuzelin yuzelin deleted the enhance_time_express branch March 13, 2024 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants