Added support for Vec<UUID> // Array(UUID) #424
Open
JaminMartin wants to merge 2 commits into
Open
Conversation
3c938e0 to
6528c4b
Compare
abonander
requested changes
May 28, 2026
| use serde::ser::SerializeSeq; | ||
| use std::fmt; | ||
|
|
||
| pub mod option { |
Contributor
There was a problem hiding this comment.
Since you chose to add this, could you please add test coverage as well? I think it can just go in the existing test.
| } | ||
| ``` | ||
| </details> | ||
| * `Array(UUID)` maps to/from `Vec<uuid::Uuid>` by using `serde::uuid_vec`. Requires the `uuid` feature. |
Contributor
There was a problem hiding this comment.
It's debatable where this should go. We have a bullet point later on covering arrays, we should at least mention this as a special case there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added
serde::uuid_vecfor serializing/deserializingVec<uuid::Uuid>to/fromArray(UUID), including an option submodule for Option<Vec> <--> Nullable(Array(UUID)). I have also updated the README with a usage example in the UUID section.Reason
I found the need to have an array of UUID's in my data structure and clickhouse-rs does not currently support it. I tested my table against the python-sdk and it worked fine, so I thought I would implement it for clickhouse-rs as it is my primary clickhouse sdk.
Checklist
Delete items not relevant to your PR: