clickhouse.rs icon indicating copy to clipboard operation
clickhouse.rs copied to clipboard

Expose the binary format implementation

Open ilya-zlobintsev opened this issue 2 years ago • 2 comments

Hi, I've noticed that this library has a serde-compatible implementation of the Clickhouse binary format, and I would like to use it in my project. However, it is currently in a private module. Would it be possible to make it public?

ilya-zlobintsev avatar May 31 '23 04:05 ilya-zlobintsev

Hello, it's slightly problematic because I don't want to make it server-compatible. Also, it uses specific signatures

pub(crate) fn deserialize_from<'de, T: Deserialize<'de>>(
    input: impl Buf,
    temp_buf: &'de mut [u8],
) -> Result<T> {

to support borrowed data.

Why do you need this ser/de code?

loyd avatar Jun 02 '23 17:06 loyd

I have a UDF implement in Rust. It's currently communicating with Clickhouse using the JSONEachRow format, but I would like to use the binary format for better efficiency.

ilya-zlobintsev avatar Jun 02 '23 17:06 ilya-zlobintsev