Skip to content

Add function dateTimeToUUIDv7#84319

Merged
rschu1ze merged 16 commits intoClickHouse:masterfrom
samradovich:feat/uuidv7fromtimestamp
Aug 7, 2025
Merged

Add function dateTimeToUUIDv7#84319
rschu1ze merged 16 commits intoClickHouse:masterfrom
samradovich:feat/uuidv7fromtimestamp

Conversation

@samradovich
Copy link
Copy Markdown
Contributor

@samradovich samradovich commented Jul 23, 2025

Resolves: #84244

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Added function dateTimeToUUIDv7 to convert a DateTime value to a UUIDv7. Example usage: SELECT dateTimeToUUIDv7(toDateTime('2025-08-15 18:57:56')) returns 0198af18-8320-7a7d-abd3-358db23b9d5c.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 23, 2025

CLA assistant check
All committers have signed the CLA.

@samradovich
Copy link
Copy Markdown
Contributor Author

@rschu1ze Please feel free to add a WIP label or something similar.

You will notice that this is nearly identical to the generateUUIDv7 function... It would likely be better to merge shared functionality into a single file. I am happy to refactor things if you agree but, for now, this felt like an easy way to get the idea out there. Since the changes are purely additive we can review the function in isolation.

I will be back in the office on Sunday 7/27 so I won't be able to reliably respond to comments until then. Thanks for the review in advance!

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jul 23, 2025
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jul 23, 2025

Workflow [PR], commit [2467157]

Summary:

job_name test_name status info comment
Stateless tests (amd_debug, AsyncInsert, s3 storage, parallel) failure
02443_detach_attach_partition FAIL
Stateless tests (amd_msan, parallel, 1/2) failure
02950_parallel_replicas_used_count FAIL
03581_parallel_replicas_read_empty_ranges FAIL

@clickhouse-gh clickhouse-gh bot added the pr-feature Pull request with new product feature label Jul 23, 2025
@samradovich

This comment was marked as resolved.

@rschu1ze rschu1ze changed the title Feat/uuidv7fromtimestamp Add function dateTimeToUUIDv Aug 3, 2025
@rschu1ze rschu1ze changed the title Add function dateTimeToUUIDv Add function dateTimeToUUIDv7 Aug 3, 2025
rschu1ze

This comment was marked as resolved.

@rschu1ze
Copy link
Copy Markdown
Member

rschu1ze commented Aug 7, 2025

Stateless tests (amd_debug, AsyncInsert, s3 storage, parallel)

@rschu1ze rschu1ze added this pull request to the merge queue Aug 7, 2025
Merged via the queue into ClickHouse:master with commit 66810ba Aug 7, 2025
123 of 124 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement dateTimeToUUIDv7 function

5 participants