Skip to content

Fix materialized CTE "gate is missing" error with extremes and UNION - #113043

Closed
groeneai wants to merge 2 commits into
ClickHouse:masterfrom
groeneai:fix-mat-cte-extremes-union-gate
Closed

groeneai wants to merge 2 commits into
ClickHouse:masterfrom
groeneai:fix-mat-cte-extremes-union-gate

Conversation

@groeneai

@groeneai groeneai commented Aug 3, 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):

Fixed the logical error Reading from materialized CTE '...' before its materialization completed - DelayedPortsProcessor gate is missing in the query plan for a query with extremes = 1 whose UNION, INTERSECT or EXCEPT branches read a materialized CTE and at least one branch also builds a set, for example with IN (subquery).

Description

No related open issue found for this shape. It is a sibling of the WITH TOTALS mechanism in #111194 and was reported publicly in that PR's review as a separate investigation.

Reproducer, which aborts on current master in debug and sanitizer builds:

SET enable_analyzer = 1, enable_materialized_cte = 1, extremes = 1;
WITH a AS MATERIALIZED (SELECT number AS id FROM numbers(10))
SELECT id FROM a WHERE id IN (SELECT id FROM a)
UNION ALL
SELECT id FROM a;

Root cause: the gate is not missing from the plan, it is bypassed. When two or more united branches carry an extremes port, Pipe::unitePipes calls uniteExtremes, which built Resize -> ExtremesTransform -> EmptySink. That sink existed only to drain the transform's main output, because ExtremesTransform emits its extremes chunk only after that output reaches Finished. A sink with zero outputs has no direct edge, so initializeExecution seeds it; the seed reached the inner CreatingSets gate, which then called setNeeded on its main-side inputs before the outer gate had released the delayed CTE writer. The CTE reader ran early and threw.

The fix replaces the transform and sink with ExtremesOnlyTransform, one input and one output carrying only extremes. With no main-output stream there is nothing to drain and no childless node to seed, so the defect is removed structurally rather than patched at one instance. The per-chunk min/max merge is shared verbatim as accumulateExtremes, so extremes values cannot drift; ExtremesTransform is unchanged for its other caller, ExtremesStep.

Commit 641fc75 established this defect class and fixed the two writer-side paths via DroppingTransform. uniteExtremes was the remaining uncovered site.

Performance: two processors instead of three, only on the extremes branch. No new setting or format change, so no SettingsChangesHistory.cpp entry.

Validation

uniteExtremes is shared by every unitePipes caller that unites two or more extremes-carrying branches, including UnionStep, IntersectOrExceptStep, CreatingSetsStep, MaterializingCTEStep, AggregatingStep and multi-shard reads through ReadFromRemote, so the extremes result was proven unchanged rather than argued.

  • Both directions: the new test aborts with the verbatim fatal on the pre-fix binary (exit 134, frame 5 MemorySource::generate at ReadFromMemoryStorageStep.cpp:87) and passes after the change.
  • Extremes values: 30 probes A/B against a pristine master build covering 2, 3 and 4 branches, Nullable, all-NULL, LowCardinality, LowCardinality(Nullable), const columns, Float with NaN and infinities, String, Date, Decimal, Array, Tuple, Map, multi-column, empty branches, WITH TOTALS, UNION DISTINCT, INTERSECT, EXCEPT and aggregation. Byte-identical, with denormals quoted so NaN and infinity stay distinguishable.
  • ExtremesStep path: seven single-pipe probes byte-identical, confirming the other caller is untouched.
  • Edge cases byte-identical and no stuck pipeline: both branches empty, one empty, single-row arms, LIMIT 0, LIMIT 1 early termination, and multi-chunk accumulation with max_block_size = 3.
  • Structural check: EXPLAIN PIPELINE graph=1 shows the childless EmptySink gone and ExtremesOnlyTransform's single output feeding the gate; the only remaining childless node is the gate itself.
  • Regression sweep of 232 extremes, totals, union, intersect, materialized CTE and creating-sets tests: 227 pass, no existing .reference changed. The 5 failures fail identically on a pristine master build for environment reasons, distributed access and missing stateful data.
  • The new test: 50 runs with randomized settings and 50 with randomization disabled, all green. extremes = 1 is pinned per statement so runner randomization cannot make it vacuous.

groeneai and others added 2 commits August 2, 2026 17:39
An `extremes = 1` query whose UNION/INTERSECT/EXCEPT branches read a materialized
CTE, where at least one branch also builds a set (`IN (subquery)`), failed with

  Logical error: 'Reading from materialized CTE 'a' before its materialization
  completed - DelayedPortsProcessor gate is missing in the query plan'

The gate was not actually missing from the plan, it was bypassed. When two or more
united branches carry an extremes port, `Pipe::unitePipes` calls `uniteExtremes`,
which built `Resize -> ExtremesTransform -> EmptySink`. That sink only existed to
swallow the transform's main-output rows, because `ExtremesTransform::prepare`
emits its extremes chunk only once the main output has been drained to `Finished`.

`ExecutingGraph::addEdges` records a direct edge only for connected output ports,
so a sink with zero outputs has none and `initializeExecution` seeds it. The seed
propagated up through the extremes chain into the inner `CreatingSets` gate, whose
`prepare` reacts to its first output event by calling `setNeeded` on its main-side
inputs, before the outer gate had released the delayed CTE writer. The CTE reader
then ran, observed `is_built == false`, and threw.

Replace the transform/sink pair with `ExtremesOnlyTransform`, one input and one
output carrying only extremes. With no main-output stream there is nothing to
drain, so no childless node exists for the executor to seed. The returned port is
the processor's only output and the caller always connects it, which removes the
defect structurally rather than patching one instance of it. The per-chunk min/max
merge is shared verbatim as `accumulateExtremes`, so the extremes values, including
the `isColumnConst` case, cannot drift between the two processors.

Commit 641fc75 established this defect class and fixed the two writer-side
paths via `DroppingTransform`; `uniteExtremes` was the remaining uncovered site.

`ExtremesTransform` itself is unchanged for its other caller, `ExtremesStep`.
The five committed queries all had arms whose extremes coincide, so
merge(arms) == arms[0] in every one of them. A uniteExtremes that never
merged across arms would have left all five references byte-identical:
the test proved only that the united extremes port exists, not that the
extremes-of-extremes computation is correct. Both halves of uniteExtremes
moved in this change (the accumulation body relocated to a free function,
the driver swapped from ISimpleTransform to IAccumulatingTransform), so
leaving the value half untested was the wrong coverage split.

Add two queries whose asserted extremes are unreachable from any single
arm: a two-arm EXCEPT discriminating the max (arms (0,4) and (15,19)) and
a three-arm INTERSECT discriminating both bounds (arms (5,9), (0,9) and
(5,19)), which also keeps the Resize-with-three-inputs path covered. Both
are set operations, which yield one deterministic row set where a UNION
ALL's arm order does not, and both stay at top level because an enclosing
subquery would make addExtremesTransform drop the united extremes and
recompute them over the final rows. Each retains its IN-subquery, so the
inner CreatingSets gate and the abort regression are preserved.

Verified by mutating the accumulation to keep only the first arm's chunk:
the two new queries fail on an extremes value while the old five-query
file still passes on that same mutant. The reference was regenerated on a
pristine master build from the same queries with the IN-subquery removed,
not copied from the build under test.

Co-Authored-By: Claude Fable 5 <[email protected]>
@groeneai

groeneai commented Aug 3, 2026

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 rounds, 2 findings) plus my own
cold review of the resulting code. Rounds: 1 full pass, 1 fix round, 1 delta re-review.

# Sev Finding Verdict Evidence / action
1 ⚠️ The regression test cannot detect a broken extremes MERGE: every arm range already spans the final range, so the test would still pass if uniteExtremes returned only the first extremes port (tests/queries/0_stateless/04713_materialized_cte_extremes_union.sql) AGREE, fixed @ b1f9d3e Correct, and wider than stated: I recomputed the per-arm arithmetic and merge(arms) == arms[0] held for all five committed queries, not just the three-arm one. Added two queries whose asserted extremes are unreachable from any single arm: a 2-arm EXCEPT with arms (0,4) and (15,19) discriminating the max, and a 3-arm INTERSECT with arms (5,9), (0,9) and (5,19) discriminating both bounds while keeping the 3-input Resize path covered. Both keep the IN (subquery) predicate so the abort regression is preserved, and both stay top level, which is required: addExtremesTransform begins with if (pipe.getExtremesPort()) pipe.dropExtremes(), so a subquery wrap would recompute extremes over final rows and silence the oracle. Armed state proven by mutation, not argument: a build that never merges across arms reddens on exactly the two new assertions (max 19 to 4, min 0 to 5), while the OLD five-query file and its old reference PASS byte for byte on that same build. Determinism 12 of 12 identical; reference regenerated on a pristine master build from an independent oracle.
2 ⚠️ Show that the existing consumers of the changed united-extremes topology still pass, including remote, delayed and exception paths (src/QueryPipeline/Pipe.cpp, uniteExtremes) AGREE, executed Raised in both rounds because the reviewer works cold and cannot run tests. The blast-radius sweep had selected tests by file name, missing 29 of the 44 whose content mentions extremes. Ran the six direct oracles: 01232_extremes (3-arm unions plus 5 multi-shard remote reads, its reference recording extremes of extremes), 04256_extremes_transform_partial_populate_on_exception, 02421_formats_with_totals_and_extremes, 01660_second_extremes_bug and 01245_distributed_group_by_no_merge_with-extremes_and_totals all pass on the fixed build. 02863_delayed_source_with_totals_and_extremes fails identically on a pristine master control (async-insert timeout on a ReplicatedMergeTree INSERT without CI ZooKeeper), so it is environmental; its actual subject, the DelayedSource extremes path, was instead confirmed positively by a direct probe including a two-shard variant that reaches uniteExtremes, byte identical to the control with a real extremes block present. For 04256 the expected MEMORY_LIMIT_EXCEEDED still holds on all four budgets with the server alive, so the relocated accumulation code still raises a clean exception.

Severity: ❌ blocker / ⚠️ major / 💡 nit. No blockers. DISAGREE verdicts carry recorded evidence
and are terminal per finding; findings on hunks unchanged by the fix round are auto-dropped.

I also verified independently, reading the code cold before the evidence bundle, that the fix
removes the defect class structurally rather than patching one instance: initializeExecution
seeds every node with no connected output, EmptySink has none by construction and its prepare
calls setNeeded, so inside the gated subtree that seed became an upstream demand reaching the
inner gate. ExtremesOnlyTransform has a single output and no main stream, so nothing needs
draining and no such node exists there. The remaining drain path is safe in the other direction:
NullSink::prepare closes its input and never calls setNeeded, so it cannot seed demand. Losing
the always-draining sink cannot stall the branch either, because the output format needs its
extremes input only after the main stream finishes, and each arm's ExtremesTransform completes
its main stream before touching its extremes output.

Session id: cron:clickhouse-review-slot-10:20260802-235600

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate
# Check Answer
a Deterministic repro? Yes. clickhouse local on the reproducer exits 134 with the verbatim gate is missing in the query plan fatal, frame 5 MemorySource::generate at ReadFromMemoryStorageStep.cpp:87. Not a probabilistic flake.
b Root cause explained? Yes. uniteExtremes attached a childless EmptySink to drain ExtremesTransform's main output. ExecutingGraph::addEdges records a direct edge only for connected outputs, so initializeExecution seeds a zero-output node; that seed propagated into the inner CreatingSets gate, whose prepare calls setNeeded on main-side inputs on its first output event, before the outer gate released the delayed CTE writer.
c Fix matches root cause? Yes. The childless node is eliminated by removing the unwanted main-output stream, not by relaxing the is_built assertion (which is the detector and stays) and not by guarding the reader.
d Test intent preserved / new tests added? New stateless test 04713_materialized_cte_extremes_union covering the reported shape plus INTERSECT, EXCEPT, a 3-branch union and WITH TOTALS. No existing test weakened; no no-parallel tag needed. extremes = 1 is pinned per statement so runner randomization cannot make it vacuous. uniteExtremes both removes the childless node and merges extremes across arms, so two further queries assert extremes that no single arm can produce: a 2-arm EXCEPT over arms (0,4) and (15,19) discriminating the max, and a 3-arm INTERSECT over (5,9), (0,9) and (5,19) discriminating both bounds while keeping the 3-input Resize covered. Both are set operations, for a deterministic row set, and both stay at top level because an enclosing subquery would make addExtremesTransform drop the united extremes and recompute them over the final rows.
e Demonstrated in both directions? Yes. The committed test file aborts on a pristine master build and passes on the fixed build. The .reference was generated from an independent oracle (the same queries with the no-op IN filter removed, a shape that passes pre-fix), never captured from the artifact under test. The extremes assertions are mutation-proven: with the accumulation reduced to the first arm's chunk, the two merge-discriminating queries fail on an extremes value, while the earlier five-query form passes on that same mutant. 12 consecutive runs are byte-identical.
f General across code paths? Yes. The fix is in the shared helper, so every unitePipes caller is covered at once (UnionStep, IntersectOrExceptStep, CreatingSetsStep, MaterializingCTEStep, AggregatingStep). All other EmptySink and NullSink sites were enumerated: NullSink::prepare closes its input and never pulls, and the remaining EmptySink uses are terminal completion through QueryPipeline::complete, which drops totals and extremes first. uniteTotals builds Concat -> Limit and creates no sink.
g Generalizes across inputs? Yes. 30 A/B probes against a pristine master build: 2, 3 and 4 branches, Nullable, all-NULL, LowCardinality, LowCardinality(Nullable), const columns, Float with NaN and infinities, String, Date, Decimal, Array, Tuple, Map, multi-column, empty branches, WITH TOTALS, UNION DISTINCT, INTERSECT, EXCEPT, aggregation. Byte-identical extremes, with denormals quoted so NaN and infinity remain distinguishable. Edge cases also byte-identical: both branches empty, one empty, single-row arms, LIMIT 0, LIMIT 1, and multi-chunk accumulation at max_block_size = 3.
h Backward compatible? Yes. Internal pipeline topology only. No new or changed setting, no serialization or format change, so no SettingsChangesHistory.cpp entry. Extremes output is proven unchanged.
i Invariants and contracts preserved? Yes. uniteExtremes still returns a single valid OutputPort *, and its early returns for zero and one port are unchanged. The new processor derives from IAccumulatingTransform, so the drain-then-emit finish bookkeeping is the framework's; no run hung, including the early-termination cases, which is what a miscounted active pair would have produced. The shared accumulateExtremes body is byte-for-byte the previous ExtremesTransform::transform, so min/max semantics including the isColumnConst case cannot drift.

Regression sweep of 232 extremes, totals, union, intersect, materialized CTE and creating-sets tests: 227 pass and no existing .reference changed. The 5 failures fail identically on a pristine master build for environment reasons (distributed access to 127.0.0.2, and missing stateful test.hits data). The new test is green over 50 runs with randomized settings and 50 with randomization disabled.

Because uniteExtremes only runs with at least two extremes-carrying pipes, the existing extremes = 1 union and multi-shard remote tests are the most direct oracles for it, so they were run explicitly: 01232_extremes (whose reference records extremes-of-extremes over both 3-arm unions and 5 multi-shard reads), 04256_extremes_transform_partial_populate_on_exception, 02421_formats_with_totals_and_extremes, 01660_second_extremes_bug and 01245_distributed_group_by_no_merge_with-extremes_and_totals all pass. 04256 still yields a clean MEMORY_LIMIT_EXCEEDED at every one of its four memory budgets, with the server surviving, so the relocated accumulation code keeps its mid-population exception behaviour. 02863_delayed_source_with_totals_and_extremes could not run here: its ReplicatedMergeTree insert times out identically on a pristine master build without the CI ZooKeeper configuration. Its subject, the DelayedSource extremes path, was instead confirmed directly with a non-replicated equivalent using the same use_delayed_remote_source failpoint, including a two-shard variant that does reach uniteExtremes: byte-identical to pristine master, with DelayedSource confirmed present in the pipeline.

Session id: cron:clickhouse-review-slot-10:20260802-235600

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

cc @novikd @PedroTadim, could you review this? uniteExtremes attached a childless EmptySink purely to drain ExtremesTransform's main output, and initializeExecution seeds childless nodes, so inside a DelayedPortsProcessor-gated subtree that seed reached the inner gate and pulled a materialized CTE before its writer was released; the sink and the unwanted main stream are replaced by an extremes-only transform.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Aug 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b1f9d3e]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_debug, targeted) FAIL
Logical error: Reading from materialized CTE 'A' before its materialization completed - DelayedPortsProcessor gate is missing in the query plan (STID: 2467-2c2d) FAIL cidb
AST fuzzer (amd_debug, targeted, old_compatibility) FAIL
Logical error: Reading from materialized CTE 'A' before its materialization completed - DelayedPortsProcessor gate is missing in the query plan (STID: 2467-2c2d) FAIL cidb
Stress test (amd_asan_ubsan) FAIL
Logical error: Reading from materialized CTE 'A' before its materialization completed - DelayedPortsProcessor gate is missing in the query plan (STID: 2467-2c2d) FAIL cidb

AI Review

Summary

This PR fixes the materialized-CTE scheduling bug in uniteExtremes by removing the childless EmptySink that could seed demand through a DelayedPortsProcessor-gated subtree before the CTE writer was released. I reviewed the current diff and surrounding processor contracts, checked the existing PR discussion and review-thread state, and did not find any remaining correctness, liveness, compatibility, or evidence gaps in the current code.

Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 23/23 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Aug 3, 2026
@PedroTadim

Copy link
Copy Markdown
Member

@groeneai why did you tagged me?

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Sorry, my mistake. I picked you as the materialized CTE component owner, but that is wrong: my own routing notes had you recorded for it and the component tree does not list you there at all. The right reviewer is @ novikd, who owns the feature and wrote the earlier DroppingTransform fix for this same defect class (641fc75), and he is already cc'd, so nothing is needed from you here. I have corrected my record.

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — b1f9d3e

Every failure below has an owner: a fixing PR (ours 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) / DelayedPortsProcessor gate is missing pre-existing, measured: a fuzz of this PR's own new 04713 test wrapped in EXPLAIN ANALYZE. Reproduces identically on a pristine-master binary, so it is not caused by this diff a fix task is created (investigating at full effort — fixing-PR link to follow here)
AST fuzzer (amd_debug, targeted, old_compatibility) / DelayedPortsProcessor gate is missing same shape as above a fix task is created (investigating at full effort — fixing-PR link to follow here)
Stress test (amd_asan_ubsan) / DelayedPortsProcessor gate is missing same shape as above a fix task is created (investigating at full effort — fixing-PR link to follow here)
Build (arm_release) / Post Hooks CI telemetry infra: build_profile_hook.py INSERT into build_time_trace rejected with LogCluster query failed with code 500; the enclosing job is success a fix task is created (investigating at full effort — fixing-PR link to follow here)

All 171 other checks passed (Finish Workflow and Config Workflow both green).

Why the three fuzzer/stress reds are not caused by this diff, measured rather than argued. The
aborting query is a mutation of the 04713 test added here: the targeted fuzzer's corpus is seeded
from the changed test files of the PR under test (ci/jobs/ast_fuzzer_job.py
_collect_targeted_queries), so adding a regression test for one shape hands its neighbouring shapes
to the fuzzer. I ran the failing query on two binaries: this PR's build and a pristine-master build
(provenance checked by symbol census rather than by path). Both abort identically, rc=134 with the
same two log lines.

The shape also does not go through the function this PR changes. uniteExtremes early-returns
unless it has more than one input port, and the abort still reproduces with a single arm and no set
operation at all:

SET enable_analyzer = 1;
SET enable_materialized_cte = 1;
EXPLAIN ANALYZE processors = 1 WITH a AS MATERIALIZED (SELECT number AS id FROM numbers(10))
SELECT id FROM a WHERE id IN (SELECT id FROM a) SETTINGS extremes = 1;

The necessary ingredients are EXPLAIN ANALYZE plus extremes = 1 plus a materialized CTE read
under an IN-subquery. The plain SELECT form that this PR targets returns rc=0 on the same binary,
and both extremes = 0 controls pass, so the remaining suspicion sits on the EXPLAIN pipeline
termination path rather than on extremes plumbing. That is recorded for the fix task and is a
separate defect from the one fixed here.

Session id: cron:our-pr-ci-monitor:20260803-123000

@groeneai

groeneai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the three DelayedPortsProcessor gate is missing rows in the finish ledger above:
#113683.

It is the EXPLAIN ANALYZE pipeline termination path the ledger pointed at, and it is a separate
site from the one this PR changes. QueryPipelineBuilder::addPipelineBefore routes the totals and
extremes streams through the DelayedPortsProcessor that gates the materialized CTE read, so those
streams are gate output ports; QueryPipeline::complete discarded them by attaching a NullSink,
which has no outputs, so ExecutingGraph::initializeExecution seeds it and its prepare closes its
input without ever pulling. That finishes a gate output, the gate closes the paired input, and the
gated sub-pipeline is released before the CTE has been built. #113683 discards the two streams with
a DroppingTransform on the main output instead, which keeps data outputs and is therefore not
seeded.

The minimal reproducer published in the ledger is covered verbatim by the new test there, and the
Post Hooks row is unaffected and keeps its own owner.

@novikd novikd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It does not fix the problem

@novikd

novikd commented Aug 7, 2026

Copy link
Copy Markdown
Member

@groeneai, why did you open this PR if there is #111194?

@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Correction to the fixing-PR link above: #113683 was closed unmerged, so the owner of those three DelayedPortsProcessor gate is missing rows is now #111194, which is consolidating both drop sites. The mechanism in the comment above is unchanged and still measured; only the vehicle moved.

@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

You are right that the PR is red, and right that it belongs with #111194. Both, for the same reason: there are three separate childless-sink sites, and the red checks here are not the one this PR changes. I will fold this into #111194 and close this PR.

The measurement, because it decides which change is still missing there. Taking the query from this PR's own failing AST fuzzer (amd_debug, targeted, old_compatibility) check and removing only the EXPLAIN ANALYZE wrapper, on a debug build of this PR's head against a pristine master build:

form of the same query master this PR
plain SELECT abort 23 rows
EXPLAIN ANALYZE ... abort abort

So the wrapper is the whole difference, and the aborting form goes through a different helper. EXPLAIN ANALYZE completes its pipeline with an EmptySink at InterpreterExplainQuery.cpp:1293, which reaches the file-static drop at QueryPipeline.cpp:505, not Pipe::dropTotals/dropExtremes.

The third site is the one this PR changes: uniteExtremes at Pipe.cpp:43 builds its own EmptySink at Pipe.cpp:59 and calls neither dropTotals nor dropExtremes, so it is not reachable from the consolidation in #111194 either. Its patch at 735abc8f has no non-context occurrence of uniteExtremes. Measured on a build of #111194 alone: the shape here still aborts, while carriers it does cover (INSERT ... SELECT with extremes, and a count() over a WITH TOTALS subquery) return correct results on the same binary, which is what makes that abort mean "not covered" rather than a bad build.

Separately, your point on #111194 that keeping NullSink does not solve it holds for this site too, and the same remedy applies: uniteExtremes needs a consumer with an output rather than an output-less sink. I will carry it over with the DroppingTransform single-port support you asked for there, so all three sites end up on one mechanism instead of three.

@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as agreed; the change moves into #111194 with the single-port DroppingTransform support you asked for there. The branch stays intact at b1f9d3e6b4cda5ceae04af9fd598305867f03a38 so nothing has to be re-derived, and the regression test comes across with it.

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 pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants