Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/docs_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout docs source
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
# On a release, take the docs as of the released tag; otherwise take
# the default checkout (post-merge default branch / dispatched ref).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
image: clickhouse/docs-builder
steps:
- name: Checkout docs source
uses: actions/checkout@v5
uses: actions/checkout@v7

# Fetch the check driver from ClickHouse/ClickHouse rather than vendoring
# it. The driver shallow/sparse-clones the aggregator docs plus its CI
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

# Cached .debs key off this workflow file: editing the package list below
# busts it; upstream lts bumps fall back to the restore-key prefix.
- name: Cache apt packages
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: ~/.apt-cache
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/test.yml') }}
Expand Down
3 changes: 2 additions & 1 deletion clickhouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,7 @@ const chc_type *chc_block_column_type(const chc_block *b, size_t i)
const chc_column *chc_block_column(const chc_block *b, size_t i)
{ return (b && i < b->n_columns) ? b->columns[i] : NULL; }
bool chc_block_is_overflows(const chc_block *b) { return b ? b->is_overflows : false; }
int32_t chc_block_bucket_num(const chc_block *b) { return b ? b->bucket_num : 0; }
int32_t chc_block_bucket_num(const chc_block *b) { return b ? b->bucket_num : -1; }

/* Resumable block reader. Continues a (possibly partial) block parse across
* CHC_WOULD_BLOCK without re-parsing completed columns. Owns the `in`
Expand Down Expand Up @@ -2786,6 +2786,7 @@ chc__block_resume_in(chc_in *in, const chc_alloc *al,
if (b == NULL) {
b = chc__calloc(al, sizeof *b, err);
if (!b) return CHC_ERR_OOM;
b->bucket_num = -1; /* BlockInfo default, kept when frame has none */
uint64_t consumed_before = in->consumed;

/* Checkpoint packet start so a mid-header would-block rewinds here. */
Expand Down
3 changes: 3 additions & 0 deletions doc/clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ bool chc_block_is_overflows (const chc_block *b);
int32_t chc_block_bucket_num (const chc_block *b);
```

`chc_block_bucket_num` is -1 unless block is a two-level aggregation bucket,
including blocks read without BlockInfo.

Clean EOF at a block boundary returns `CHC_OK` with `*out == NULL`. Any
short read mid-block is `CHC_ERR_EOF`. The TCP packet loop in
[clickhouse-client.md](clickhouse-client.md) drives this with the right
Expand Down
Loading