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

how to support map? #101

Open
strive-run opened this issue Jan 30, 2024 · 3 comments
Open

how to support map? #101

strive-run opened this issue Jan 30, 2024 · 3 comments
Labels
need-example question Further information is requested

Comments

@strive-run
Copy link

image

ck table columns:
image

and rust struct :
image

when execute insert, error:
thread 'main' panicked at /Users/gao.wei.strive/.cargo/registry/src/rsproxy.cn-0dccff568467c15b/clickhouse-0.11.6/src/rowbinary/ser.rs:168:9:
not yet implemented

please help me , thanks.

@caibirdme
Copy link

+1, same problem

@loyd
Copy link
Collaborator

loyd commented Jul 25, 2024

The documentation is not precise enough. It literally means "serialize as Array((K, V))", so you can use Vec<(String, String)> and so on here.

What's Map, serialize_map, and (most important!) Value in your example?

@loyd
Copy link
Collaborator

loyd commented Jul 25, 2024

It's possible to support real maps (HashMap, BTreeMap, IndexMap etc) directly without using &[tuple], but it opens a large space for bugs because of #[serde(flatten)], serde_value::Value and other things which all should be handled correctly (or it ends with a lot of issues because of schema mismatch), that's not trivial.

@slvrtrn slvrtrn added question Further information is requested need-example labels Jul 29, 2024
@slvrtrn slvrtrn mentioned this issue Jul 30, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-example question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants