timeplus-io / proton-rust-client Goto Github PK
View Code? Open in Web Editor NEWRust client for Timeplus Proton, a fast and lightweight streaming SQL engine
Home Page: https://crates.io/crates/proton_client
License: Apache License 2.0
Rust client for Timeplus Proton, a fast and lightweight streaming SQL engine
Home Page: https://crates.io/crates/proton_client
License: Apache License 2.0
Describe what's wrong
Proton has two sets of HTTP APIs, one is running on port 8123
, this is the same as clickhouse. And the other is running on port 3218
which supports streaming queries. Simply put, the same query SELECT * FROM some_stream
behaves differently on these two APIs. On port 8123
it returns immediately, but on port 3128
, it will keep running and returnning fresh data.
This isssue is about running streaming query on port 3128
with this library. It won't work in release mode (e.g. using cargo run --release
). The reason why it worked for non-release mode is because of this:
[dev-dependencies]
clickhouse = { version = "0.11", features = ["test-util"] }
with the test-util
, the clickhouse
crate does not use any compression by default (otherwise, it uses lz4
), this is the tricky part. And with lz4
, streaming query does not work. So, in order to make streaming query work, we need to disable compression when do streaming query:
let client = Client::default()....;
/// do non-streaming query with the `client` ...
/// when you want to do streaming query, disable compression
client.with_compression(Compression::None);
client.query("<... my streaming query ...>").fetch ...
How to reproduce
Error message and/or stacktrace
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.