suharev7 / clickhouse-rs

Asynchronous ClickHouse client library for Rust programming language.
MIT License
324 stars 121 forks source link

streaming in `QueryResult` lost column infos when the target table is empty #222

Open framlog opened 4 months ago

framlog commented 4 months ago

Clickhouse returns only the a single block with num_rows == 0 when do SELECT over an empty table.

In such case, QueryResult::stream_blocks skips the first block, which's the only block containing infos.

The test passes because that fetch_all doesn't skip the first block.