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

Support Dynamic data type #145

Open
slvrtrn opened this issue Sep 5, 2024 · 1 comment
Open

Support Dynamic data type #145

slvrtrn opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
data-types enhancement New feature or request

Comments

@slvrtrn
Copy link
Contributor

slvrtrn commented Sep 5, 2024

https://clickhouse.com/docs/en/sql-reference/data-types/dynamic

@slvrtrn slvrtrn added enhancement New feature or request data-types labels Sep 5, 2024
@ClickHouse ClickHouse deleted a comment Sep 5, 2024
@loyd
Copy link
Collaborator

loyd commented Oct 19, 2024

According to docs this is encoded as

<binary_encoded_data_type><value_in_binary_format_according_to_the_data_type>

So, it should lead to deserialize_any (to ask for the real type from the deserializer).

Then, it can be parsed into some new enum Dynamic { UInt64(u64), ... } (see serde_value::Value or serde_json::Value as references).

Btw the same type can be used after moving to Native or RowBinaryWithNamesAndTypes for any columns to solve #53 and #74

Moreover, we should also support BorrowedDynamic<'_> for borrowing queries. Otherwise, it's a huge load for an allocator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-types enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants