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

feat(query): add new function TO_TIMESTAMP<int, scale> #16924

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

TCeason
Copy link
Collaborator

@TCeason TCeason commented Nov 24, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

scale support [0,6]

select TO_TIMESTAMP(1, 0), TO_TIMESTAMP(1, 1), TO_TIMESTAMP(1, 2), TO_TIMESTAMP(1, 3), TO_TIMESTAMP(1, 4), TO_TIMESTAMP(1, 5), TO_TIMESTAMP(1, 6);
----
1970-01-01 00:00:01.000000 1970-01-01 00:00:00.100000 1970-01-01 00:00:00.010000 1970-01-01 00:00:00.001000 1970-01-01 00:00:00.000100 1970-01-01 00:00:00.000010 1970-01-01 00:00:00.000001

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@TCeason TCeason requested review from b41sh and andylokandy November 24, 2024 09:26
@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Nov 24, 2024
@TCeason TCeason changed the title feat(query): add new function MICROSECONDS_TO_TIMESTAMP feat(query): add new function TO_TIMESTAMP<int, scale> Nov 24, 2024
@TCeason
Copy link
Collaborator Author

TCeason commented Nov 24, 2024

cc @soyeric128 Doc need

@TCeason TCeason force-pushed the to_ts branch 4 times, most recently from 3c580a6 to 79a83f8 Compare November 24, 2024 13:44
scale support [0,6]

select TO_TIMESTAMP(1, 0), TO_TIMESTAMP(1, 1), TO_TIMESTAMP(1, 2), TO_TIMESTAMP(1, 3), TO_TIMESTAMP(1, 4), TO_TIMESTAMP(1, 5), TO_TIMESTAMP(1, 6);
----
1970-01-01 00:00:01.000000 1970-01-01 00:00:00.100000 1970-01-01 00:00:00.010000 1970-01-01 00:00:00.001000 1970-01-01 00:00:00.000100 1970-01-01 00:00:00.000010 1970-01-01 00:00:00.000001
@b41sh b41sh added this pull request to the merge queue Nov 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 25, 2024
@b41sh b41sh added this pull request to the merge queue Nov 25, 2024
@BohuTANG BohuTANG removed this pull request from the merge queue due to a manual request Nov 25, 2024
@BohuTANG BohuTANG merged commit cf150d9 into databendlabs:main Nov 25, 2024
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with Converting Epoch Timestamp in Milliseconds to Date
3 participants