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

Update CHANGELOG, fix clippy issues #150

Merged
merged 5 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->

## [Unreleased] - ReleaseDate
### Changed
- MSRV is now 1.70 due to changes in `hyper-rustls` (see [v0.27.3](https://github.com/rustls/hyper-rustls/releases/tag/v%2F0.27.3)).
- client: `hyper-rustls` now uses pure Rust `ring` backend by default with an option to use `aws-lc-rs` through `rustls-tls-aws` feature. ([#140])
- client: TLS features priority is now `native-tls` > `rustls-tls-aws` > `rustls-tls` ([#141]).
### Fixed
- insert: fix a panic on empty insert ([#139]).

[#139]: https://github.com/ClickHouse/clickhouse-rs/pull/139
[#140]: https://github.com/ClickHouse/clickhouse-rs/pull/140
[#141]: https://github.com/ClickHouse/clickhouse-rs/pull/141

## [0.12.2] - 2024-08-20
### Changed
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,16 @@ See [examples](https://github.com/ClickHouse/clickhouse-rs/tree/main/examples).
* `lz4` (enabled by default) — enables `Compression::Lz4` and `Compression::Lz4Hc(_)` variants. If enabled, `Compression::Lz4` is used by default for all queries except for `WATCH`.
* `native-tls` — supports urls with the `HTTPS` schema via `hyper-tls`, which links against OpenSSL.
* `rustls-tls` — supports urls with the `HTTPS` schema via `hyper-rustls`, which does not link against OpenSSL.
* `rustls-tls-aws` - use [`aws-lc-rs`](https://github.com/rustls/hyper-rustls?tab=readme-ov-file#crate-features) instead of the default pure Rust `ring` backend for `hyper-rustls`.
* `inserter` — enables `client.inserter()`.
* `test-util` — adds mocks. See [the example](https://github.com/ClickHouse/clickhouse-rs/tree/main/examples/mock.rs). Use it only in `dev-dependencies`.
* `watch` — enables `client.watch` functionality. See the corresponding section for details.
* `uuid` — adds `serde::uuid` to work with [uuid](https://docs.rs/uuid) crate.
* `time` — adds `serde::time` to work with [time](https://docs.rs/time) crate.

> **NOTE**:
> When connecting to ClickHouse via an `HTTPS` url, you must enable either the `native-tls` or `rustls-tls` features.
> If both are enabled, the `rustls-tls` feature will take precedence.
> When connecting to ClickHouse via an `HTTPS` url, you must enable either the `native-tls`, `rustls-tls` or `rustls-tls-aws` features.
> If all are enabled, the priority is `native-tls` > `rustls-tls-aws` > `rustls-tls`.

## Data Types
* `(U)Int(8|16|32|64|128)` maps to/from corresponding `(u|i)(8|16|32|64|128)` types or newtypes around them.
Expand Down
2 changes: 1 addition & 1 deletion src/compression/lz4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl<S> Lz4Decoder<S> {

fn calc_checksum(buffer: &[u8]) -> u128 {
let hash = cityhash_102_128(buffer);
hash << 64 | hash >> 64
hash.rotate_right(64)
}

fn decompress(compressed: &[u8], uncompressed: &mut [u8]) -> Result<usize> {
Expand Down
6 changes: 3 additions & 3 deletions tests/it/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "camelCase")]
struct RenameRow {
#[serde(rename = "fix_id")]
pub fix_id: i64,
pub(crate) fix_id: i64,
#[serde(rename = "extComplexId")]
pub complex_id: String,
pub ext_float: f64,
pub(crate) complex_id: String,
pub(crate) ext_float: f64,
}

async fn create_rename_table(client: &Client, table_name: &str) {
Expand Down