Giter Site home page Giter Site logo

timeplus-io / proton-rust-client Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 92 KB

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

Makefile 5.02% Shell 24.88% Rust 70.09%

proton-rust-client's People

Contributors

github-actions[bot] avatar jovezhong avatar marvin-hansen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

marvin-hansen

proton-rust-client's Issues

Streaming query does not work in release mode.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.