clickhouse-rs
clickhouse-rs copied to clipboard
ClientHandle::insert() should not consume a block when it fails
Currently, the insert()
method of ClientHandle
accepts a Block
instance only by value, forcing its consumption, regardless of whether the insert operation runs successfully or not. This introduces unnecessary hassle with contents cloning (and keeping in RAM), whenever implementing repeating attempts of inserting the data.
Ideally, the Block
should be taken by reference instead. Failing that, it should be returned back in the Result
error value.
Thanks for the advice. The implementation of this has already been pushed into this repository and will be in the next release.