Skip to content

Fix reading a column of aggregate function states whose serialized form is empty - #119700

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix-empty-aggregate-state-bulk-read
Closed

groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix-empty-aggregate-state-bulk-read

Conversation

@groeneai

@groeneai groeneai commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix reading a column of aggregate function states whose serialized form is empty, such as countResample over an empty range. The column read back as zero rows, which made a Dynamic or Variant column holding it fail with a logical error on every read and on every merge, leaving the table unreadable and unmergeable, and made a Log table holding only such a column read as empty.

Description

countResample(begin, end, step) with end < begin is a legal function whose state occupies no bytes and whose serialize writes none, so a hundred rows occupy zero bytes in a part. Reading them back, SerializationAggregateFunction::deserializeBinaryBulk stops on istr.eof(), appends zero rows and reports success. A Dynamic column then aborts with

Logical error: 'Size of variant AggregateFunction(countResample(-9223372036854775807, 1048576, 1),
UInt64, UInt64) is expected to be not less than 100 according to discriminators, but it is 0'

A merge reads the parts the same way, so such a table stays unreadable and unmergeable. A bare column fails with CANNOT_READ_ALL_DATA in a compact part, and Log decides whether it holds rows from the size of its first data file, which such a column leaves empty.

limit is an upper bound by contract, so the leaf cannot just honour it: TinyLog passes a block size it has no row count for, and would invent rows not on disk. So a caller whose count is exact and server-written says so (number_of_rows_is_exact, set by the two MergeTree readers and by Log), a function declares whether its serialized form is empty (serializedStateIsEmpty(), true for Resample over an empty range and forwarded by every combinator adding no bytes of its own, -Tuple and the flagless nullable adapter included), and only then are the states reconstructed from the count. Native keeps today's CANNOT_READ_ALL_DATA: its count comes from an untrusted header and clients have no memory limit by default.

The eof stop is long-standing, so this is not a regression of #117370. Found by the AST fuzzer on an unrelated pull request (job, report); reproduced on plain master without the thread sanitizer, ruling it out.

05055_aggregate_state_bulk_deserialization_overflow gains the carrier, a merge, a compact part, three combinator empty ranges, Log against TinyLog, and non-empty zero-size controls; existing expectations unchanged.


Workflow [PR]
Sync PR [sync-upstream/pr/119700]

…mpty

`countResample(begin, end, step)` with `end < begin` is a legal function: the
constructor takes the `end < begin` branch and sets `total = 0` without throwing.
Then `sizeOfData()` is `mulOverflow(0, size_of_data)` = 0 and `serialize` loops
`total` times, so such a state writes no bytes at all and a hundred rows of it
occupy zero bytes in a part.

`SerializationAggregateFunction::deserializeBinaryBulk` stops on `istr.eof()`,
which for that column is already true before the first iteration, so it appends
zero rows and reports success. The desync surfaces far away:
`SerializationVariant` finds a sub-column of size 0 where the discriminators
promise 100 and throws `Size of variant ... is expected to be not less than 100
according to discriminators, but it is 0`, `MergeTreeReaderCompact` rejects the
short read with `CANNOT_READ_ALL_DATA`, and `Log` returns nothing. A background
merge performs the same read, so a table that received such a value is
unreadable and unmergeable for good.

The leaf cannot honour `limit` unconditionally. `limit` is documented as an
upper bound, "Read no more than limit values", and `TinyLog` relies on that: it
has no marks file, keeps `row_limit` at the maximum of `size_t`, passes
`min(block_size, ...)` and terminates on a short read, so reconstructing `limit`
states there would invent rows that are not on disk. An exact count is not
automatically a trustworthy one either: `NativeReader` knows the count exactly,
but it comes from a block header bounded only by
`DEFAULT_NATIVE_BINARY_MAX_NUM_ROWS`, and `clickhouse-client` sets no memory
limit by default, so reconstructing from it would let a small input allocate
without bound.

Two things must therefore both hold. `number_of_rows_is_exact` says the caller's
row count is exact and comes from data the server itself wrote: the two MergeTree
readers set it, `LogSource` sets it only when a marks file exists, and
`NativeReader` deliberately does not. `serializedStateIsEmpty()` is a declared
property of the function rather than something measured by running it, true for
`Resample` over an empty range and forwarded by the combinators whose `serialize`
is exactly the nested call. Measuring it instead would be unbounded in both
directions: `nothingResample(0, 1048576, 1)` also has `sizeOfData() == 0` yet
writes a megabyte per state, and a read-side probe would need a `catch` around an
error that nothing downstream can re-raise.

Two combinators reach an empty state by a route that is not a bare forward.
`-Tuple` lays the nested states out back to back with no framing of its own, so a
tuple of empty ranges is empty; `countResampleTuple` needs each *argument* to be a
`Tuple` and hands element i of each to nested function i, which is why an earlier
probe of it read as unconstructible. The `Null` combinator consults
`getOwnNullAdapter` before its own variadic default, and `AggregateFunctionIf`
returns the `<false, false>` adapter whenever the result cannot be inside
`Nullable`, as an `Array` cannot; there `prefix_size` is 0 and `getFlag` is the
literal `true`, so `serialize` writes exactly the nested bytes. The
`!serialize_flag` guard keeps the instantiations that do write a flag byte out of
this, which is the whole difference between a state of no size and a state of no
bytes.

`AggregateFunctionNothing` is the counterexample that shapes the guard. Its
`sizeOfData()` is 0 while `serialize` writes one byte, so keying on the size
alone would lose its `eof` stop and turn the existing case in 05055 that declares
a billion rows of it into an eight gigabyte allocation.

`Log` also decided whether it held any rows from the size of its first data file,
which such a column leaves at zero bytes while `__marks.mrk` records its rows, so
a table whose first or only column is one read as empty however the states were
deserialized. The marks are what answer that for `Log`; `TinyLog` has none and can
only look at the size, so it keeps the old test.

A `Native` file holding such a column still fails with `CANNOT_READ_ALL_DATA`,
for the reason above. The TCP wire is unaffected, because the protocol bytes
that follow a block keep the stream from ending.

This is not a regression of a9bbf03, which only moved the `eof` stop into a
block loop: `createAndDeserializeBatch` has carried it since 96bb781, and
the inline loop before that had it too.

Co-Authored-By: Claude Opus 5 <[email protected]>
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-request PR origin: a maintainer pinged or directed groeneai labels Sep 12, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 2 passes; 5 blockers and majors in
round 0, all accepted and fixed; 0 findings in the round 1 delta re-review). Every finding below was
adjudicated against the code, and each accepted one carries a regression case that fails without it.

# Sev Finding Verdict Evidence / action
1 ❌ AggregateFunctionTuple serializes to nothing at size zero, so -Tuple carried the same defect as Resample (AggregateFunctionTuple.cpp:480) AGREE, fixed serialize is a bare concatenation with no framing and the constructor gives total_state_size = 0 for all-empty elements, so the property now propagates. Regression case measured at 0 serialized bytes. The round 0 probe that dismissed it had measured its own spelling: countResampleTuple needs each argument to be a Tuple.
2 ❌ The -If null adapter AggregateFunctionIfNull*<false, false> writes no flag byte, so it carried it too (AggregateFunctionIf.cpp:501) AGREE, fixed The Null combinator consults getOwnNullAdapter before its own variadic default, and AggregateFunctionIf returns the flagless adapter whenever the result cannot be inside Nullable, as an Array cannot. There prefix_size is 0 and serialize writes exactly the nested bytes. Guarded by !serialize_flag, which is the line between a state of no size and a state of no bytes.
3 ❌ ENGINE = Log decided a table was empty from the size of its first data file (StorageLog.cpp:1071) AGREE, fixed A table whose first or only column is such a state read as zero rows while __marks.mrk recorded them. Emptiness now comes from the marks for Log, using the same expression totalRows() uses; TinyLog, which has no marks, keeps the size proxy and keeps its old expectation.
4 ⚠️ No malformed Native case carried a genuinely empty serialized state, so nothing policed NativeReader deliberately not setting the flag AGREE, fixed A third format(Native, ...) case now declares a billion rows and carries zero bytes. It expects CANNOT_READ_ALL_DATA, and a build that sets the flag there answers MEMORY_LIMIT_EXCEEDED for 8.00 GiB instead, so the case fails.
5 ⚠️ The non-empty-serialization control could be answered from metadata rather than reading the columns AGREE, fixed; acceptance clause withdrawn The forced read landed and is load-bearing: EXPLAIN shows the old form was answered by _minmax_count_projection with the state columns never read. My demand that it also fail under a mutation build was impossible and I withdrew it. A state of size zero holds nothing, so nothing deserialize reads of it can be observed; the only remaining effect of dropping the second predicate is an unconsumed stream remainder, and every reader for which the row count is exact reaches each column through its own file or its own seek. No function in the tree has sizeOfData() == 0 with content-bearing serialized bytes, so no SQL case can separate the two predicates. Verified instead by a measured table of serialized byte counts across the whole combinator matrix, at the level where the property is defined.
6 ⚠️ Not mergeable: #115528 merged into master while this was in review and touches both MergeTree reader anchors AGREE, fixed Rebased; both flags kept at both anchors and deliberately not collapsed, because "a partially read column is refilled with defaults" is not "the row count is authoritative". Its flag is consumed in exactly one place, which cannot reach the AggregateFunction read path.
7 💡 Two comment blocks over the per-block ceiling, one with a fix-referential tail; missing commit trailer AGREE, fixed Trimmed to 3 lines each with nothing added elsewhere to compensate.
8 ⚠️ The new deserializeBinaryBulkWithMultipleStreams override drops the avg_value_size_hint callbacks DISAGREE SerializationAggregateFunction::deserializeBinaryBulk ignores the hint (double /*avg_value_size_hint*/), the hint map is keyed per stream name, and no other serialization reads an AggregateFunction stream. Compared line by line against the base implementation; nothing else differs.
9 💡 -Array, -Merge, -State and -SimpleState propagate the property but have no regression case DISAGREE All four serialize bodies are a bare nested_func->serialize(place, buf, version) with no framing, so each one-line forward is correct by inspection. The four routes that are not bare forwards (Resample in both its branches, -Tuple, the flagless nullable adapter, and -If inside a non-empty Resample) all do have one.
10 💡 StorageStripeLog also reads through NativeReader, and the description names only Native DISAGREE Same untrusted-header class, stated as a mechanism rather than an engine list.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal
per finding.

Not in this change, and disclosed rather than promised: StorageLog::backupData carries the same
first-data-file size proxy one function away from the line fixed here. I measured a Log table whose
only column is such a state backing up to metadata only and restoring as 0 rows of 100, and, with an
ordinary column first, a backup that passes the proxy but omits the zero-byte data file so the
restored table fails with FILE_DOESNT_EXIST. This change is deliberately kept to the read path.

Session id: cron:clickhouse-review-slot-10:20260912-220600

@clickhouse-gh clickhouse-gh Bot closed this Sep 12, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Sep 12, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes, 100% of runs, no randomization needed: CREATE TABLE t (k UInt64, s Dynamic) ENGINE = MergeTree ORDER BY k SETTINGS min_bytes_for_wide_part = 0, min_rows_for_wide_part = 0 then INSERT INTO t SELECT number, countResampleState(10, 5, 1)(number, number) FROM numbers(100) GROUP BY number and SELECT count(), uniqExact(dynamicType(s)) FROM t aborts with the according to discriminators logical error. The fuzzer's original spelling reproduces the message byte for byte on plain master in a debug build with no thread sanitizer.
b Root cause explained? countResample with end < begin has total = 0, so sizeOfData() is 0 and serialize writes zero bytes. 100 rows then occupy 0 bytes in the part, SerializationAggregateFunction::deserializeBinaryBulk's remaining != 0 && !istr.eof() is false on the first iteration, and it appends 0 rows while reporting success. SerializationVariant finds a size 0 sub-column where the discriminators promise 100. Separately, StorageLog::createReadingPipe decided whether the table held any rows from the size of its first data file, which such a column leaves at zero bytes while the marks record its rows.
c Fix matches root cause? The read is repaired at the single leaf every reader of an AggregateFunction column goes through, keyed on a declared property of the function plus an exact, server-written row count; and Log now takes its emptiness verdict from the marks it already loaded rather than from a file size. Not a widened bound, not a guard at the throw site, not a DDL rejection of an empty range.
d Test intent preserved / new tests added? All 8 original assertions unchanged (5 serverError cases including the 1e9 declared rows nothing one, and 3 printed lines); one further printed line kept its value while its statement was hardened, because EXPLAIN showed the old spelling was answered by _minmax_count_projection without reading the state columns at all. Added: 13 printed assertions and a 6th serverError case. Forcing the new branch unconditionally turns the 1e9 nothing case into an 8 GiB allocation (Code: 241), makes TinyLog return 65409 invented rows, and turns the new Native case from CANNOT_READ_ALL_DATA into the same 8 GiB allocation, so those controls are load-bearing rather than decorative.
e Both directions demonstrated? Yes, per arm, on Build-ID-verified binaries (31617fb5... plain master, 38df13b9... the first iteration of this fix, 752b7971... the current one). Without the fix: Dynamic SELECT and merge abort (exit 134), a compact part fails CANNOT_READ_ALL_DATA. Rows read: 0. Rows expected: 100, Log returns 0 of 100 rows. With it: 100 1, 200 1 after OPTIMIZE FINAL with one active part, 100 0, 100 rows. The three carriers found in review are shown against 38df13b9..., which carries the rest of the fix and nothing else: -Tuple and the nullable-argument adapter each still abort there with the same Size of variant ... but it is 0 message naming their own type, and a Log table whose only column is such a state still reads 0 of 100 rows. 50/50 runs green with randomization on.
f Fix is general across code paths? Every construction of DeserializeBinaryBulkSettings in src/ was enumerated: MergeTreeReaderWide and MergeTreeReaderCompact data reads set the flag, their prefix reads need nothing, LogSource::readData sets it only when a marks file exists, LogSource::readPrefix needs nothing, NativeReader deliberately does not set it, MergeTreeIndexSet stays conservative and is measured unreachable (no condition on such a column type-checks: Code: 43), and SerializationObjectSharedData cannot carry the defect (see g). MergeTreeSequentialSource inherits from the reader it drives, which the merge case exercises. StorageLog's first-data-file size proxy appears in three places; the read path is fixed here, and StorageLog::backupData carries the same proxy and is disclosed rather than changed in this pull request.
g Fix generalizes across inputs (params/datatypes/wrappers)? Wrappers measured: Dynamic, bare, Array, Tuple, Map, both part types, both Log engines, SELECT and merge. An empty range reached both by end < begin and by the UInt64 overflow spelling. Nesting: an empty range under -If under a non-empty Resample. Combinator classification is by reading each serialize body and then measuring the serialized byte count of every spelling in the matrix: the flagless ones (Resample over an empty range, -Tuple over empty ranges, the <false, false> nullable adapter) are 0 bytes and forward the property, while the ones that write a flag byte (<false, true>, <true, true>) measure 1 byte and keep the safe default, as do nothing (1 byte) and nothingResample(0, 1024, 1) (1024 bytes) whose states have no size but a non-empty form. -Distinct, -ForEach, -OrFill and -Map all frame bytes of their own. A JSON column cannot hold such a state at all (Code: 43 ... JSON serialization doesn't support the return type schema), so its shared data is untouched.
h Backward compatible? Yes. No format, setting or DDL change, so no SettingsChangesHistory.cpp entry is owed. The write side is untouched and the format is symmetric: parts that used to throw become readable, and nothing readable becomes unreadable. A Log table that legitimately holds no rows still reads as empty through both the metadata answer and the pipe, including with max_threads > 1.
i Invariants and contracts preserved? The documented limit contract, "Read no more than limit values", is unchanged for every caller that has only a bound: TinyLog still returns exactly what is on disk. The aliasing the new branch introduces is what the existing loop already produces for a zero-size state (place += 0), and Resample with an empty range iterates destroy zero times, proven with uniqExactResample, whose nested function is not trivially destructible, under the debug allocator. serializedStateIsEmpty() is a property of the function and never of a state, so it cannot differ between two states of one column; the !serialize_flag guard is what keeps that claim true for the Null combinator, whose flag-writing instantiations have a state of no size but a form of one byte. Log's new emptiness test keeps the !num_data_files short-circuit first, so it cannot index an empty data_files, and reads the marks that loadMarks has already loaded under the same lock.

Session id: cron:clickhouse-impl-slot-6:20260912-212000

@clickhouse-gh

clickhouse-gh Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ea951d4]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_debug, targeted) FAIL
Logical error: '!serialized.empty()' (STID: 2508-38fb) FAIL cidb
AST fuzzer (amd_debug, targeted, old_compatibility) FAIL
Logical error: '!serialized.empty()' (STID: 2508-38fb) FAIL cidb
Fast test (arm_darwin) DROPPED

AI Review

Summary

This PR fixes deserialization of zero-byte aggregate-function states by letting trusted MergeTree and Log readers reconstruct rows from an exact row count and by propagating that property through the relevant combinators. The read-path fix looks sound, but StorageLog still leaves the same invariant broken in its backup path, so I would not merge it as-is.

Findings

❌ Blockers

  • [src/Storages/StorageLog.cpp:1074] StorageLog::createReadingPipe now stops treating a zero-byte first data file as "no rows", but StorageLog::backupData still does exactly that at src/Storages/StorageLog.cpp:1252. A non-empty ENGINE = Log table whose first or only column is one of these empty serialized states will therefore read correctly after this patch, but BACKUP will still skip all table data and restore it as empty. Suggested fix: reuse the same marks-based emptiness predicate in backupData, and fall back to file-size checks only for TinyLog.
Tests
  • ⚠️ The new stateless coverage exercises SELECT, merges, Dynamic, and Log/TinyLog reads, but it does not cover BACKUP/RESTORE for the zero-byte-state Log case that remains broken here.
Final Verdict

Changes requested: fix the remaining StorageLog::backupData zero-byte-file path before merge.

LLVM Coverage Report

Measured on commit ea951d4.

Metric Baseline Current Δ
Lines 88.90% 89.00% +0.10%
Functions 91.70% 91.70% +0.00%
Branches 81.30% 81.30% +0.00%

Changed lines: Changed C/C++ lines covered: 59/66 (89.39%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Sep 12, 2026
@groeneai
groeneai requested review from azat and rschu1ze September 12, 2026 22:38
@clickhouse-gh clickhouse-gh Bot added the comp-aggregate-functions Aggregate function implementations (sum, avg, count, quantile, combinators, etc.). label Sep 12, 2026
/// A column can legitimately occupy no bytes (an aggregate state that serializes to nothing), so
/// for `Log` the marks are what say whether there are rows; `TinyLog` has none and can only look
/// at the size of the data.
const bool no_rows = !num_data_files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StorageLog::createReadingPipe now correctly uses marks instead of the first data file's size, but StorageLog::backupData still returns early on !file_checker.getFileSize(data_files[INDEX_WITH_REAL_ROW_COUNT].path) at src/Storages/StorageLog.cpp:1252. For a non-empty ENGINE = Log table whose first or only column is one of these zero-byte aggregate states, SELECT starts working again after this patch but BACKUP still writes no table data and restore loses every row. Can we switch backupData to the same marks-based emptiness check as here, using the file-size proxy only for TinyLog?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, and reproduced independently on plain master without this patch, so it does not depend on the read fix: with the zero-byte column as the only data file, BACKUP writes the metadata and no data/ directory at all, BACKUP_CREATED and RESTORED both report success, CHECK TABLE passes, and the restored table holds 0 of the 100 rows.

The marks-based check is the right shape for that half, and so is keeping the size proxy for TinyLog, which has no row count on disk and must not invent rows. It is not the whole fix, though. When the zero-byte column is not the first data file, the proxy already passes today, yet the 0-byte .bin is still missing after a restore and any query touching that column fails with Code: 107 ... FILE_DOESNT_EXIST. The second site is BackupImpl::copyFileToDisk, where an entry of size zero is materialised only under WriteMode::Rewrite (src/Backups/BackupImpl.cpp:1399-1402), while Append falls through creating nothing, and Append is the mode both StorageLog and StorageStripeLog restore with (StorageStripeLog.cpp:734). TinyLog reproduces that half too, which is why I would fix it at the shared backup layer rather than inside Log. Changing backupData alone would turn a silent loss into a table that no longer reads.

I am deliberately keeping both out of this pull request: the changelog entry here covers the read path, and the backup half needs BACKUP/RESTORE test coverage plus a guard against recreating a file that already exists, since FS::createFile opens with O_EXCL. I have it in progress separately and will post that pull request link in this thread when it opens.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened as #119722, both sites in one commit as described above, with BACKUP/RESTORE test coverage and the existsFile() guard.

One deviation from the shape suggested here, worth naming because I committed to the other one: the predicate does not use the marks alone for Log. It checks the recorded size of every data file first and only then the engine's row signal. A marks-only check regresses two states that are reachable today. TinyLog(s, k) with the zero-byte column declared first is classified empty on the strength of data_files[0], so a later column's real bytes are dropped from the backup; and for a Log table whose __marks.mrk has gone missing while sizes.json still records data bytes, master fails the backup loudly at createHardLink, whereas a marks-only predicate would report BACKUP_CREATED with no data. Recorded bytes first keeps that failure loud and adds no new error code. The size proxy is still what TinyLog falls back to, so the one case that stays lossy is a TinyLog table in which no column occupies any bytes, since no row count exists on disk there to recover.

@clickhouse-gh

clickhouse-gh Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing ea951d4a1 with master fc7975b07 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 5c0934adb; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

164 object files changed (+244.34 KiB total), 0 added.

Object file Master PR Δ
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionAvgWeighted.c… 12.46 MiB 12.48 MiB +18.78 KiB (+0.15%)
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationAggregateFunction.cpp.o 181.79 KiB 199.01 KiB +17.21 KiB (+9.47%)

716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

3053 translation units recompiled, 15916 s compile time in total, 3053 of them have a recent master baseline.

Job report

@groeneai

Copy link
Copy Markdown
Collaborator Author

The Logical error: '!serialized.empty()' failures (STID 2508-38fb) on the two AST fuzzer legs here are fixed by #119728.

They are not caused by this pull request. That assertion is master's, at KeyHolderHelpers.h:28, and it aborts a debug binary built without this branch on a query that uses no storage at all: a countResample state over an empty range serializes to zero bytes, which the -Distinct combinator then rejects as a hash table key. The fuzzer reached it by mutating the aggregate state column this branch's new test creates, which is why the signature is first-ever.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - ea951d4

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
AST fuzzer (amd_debug, targeted) / Logical error: '!serialized.empty()' (STID 2508-38fb) pre-existing master defect: getKeyHolder asserts that a serialized aggregate state cannot be zero bytes, while a countResample(begin > end) state legitimately serializes to 0. Reproduced on a pre-patch binary at the same frames, so not introduced by this PR #119728 (mine, open)
AST fuzzer (amd_debug, targeted, old_compatibility) / same STID 2508-38fb same assertion, same site, same owner #119728 (mine, open)

Mergeable Check and PR are the aggregators that report those two rows, not separate failures. Fast test (arm_darwin) was cancelled, not failed. The rest of the head is green: 154 success, 17 skipped, Finish Workflow green.

Session id: cron:our-pr-ci-monitor:20260913-040029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-aggregate-functions Aggregate function implementations (sum, avg, count, quantile, combinators, etc.). groeneai-origin-request PR origin: a maintainer pinged or directed groeneai pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants