Skip to content

Do not propagate read-in-order through PartialMergeJoin - #110671

Merged
alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
groeneai:fix-read-in-order-partial-merge-join-110662
Jul 19, 2026
Merged

alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
groeneai:fix-read-in-order-partial-merge-join-110662

Conversation

@groeneai

@groeneai groeneai commented Jul 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #110662
Related: #109216

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 wrong results from GROUP BY ... optimize_aggregation_in_order and DISTINCT ... optimize_distinct_in_order placed over a partial_merge JOIN. The read-in-order optimization was propagated through PartialMergeJoin, which re-sorts its left input by the join key and therefore does not preserve the left stream's original order, so rows were grouped incorrectly.

Description

PartialMergeJoin re-sorts left blocks by the join key (once per right block), so it does not preserve the left stream's original sorting-key order. The read-in-order-through-join optimization in optimizeReadInOrder.cpp propagated the left table's sorting-key order through the join anyway. Aggregating / DistinctSortedStreamTransform (in-order) then consumed a stream they wrongly believed was sorted by the group/distinct key and mis-grouped rows.

Fix: gate the propagation on a new IJoin::preservesLeftBlockOrder() (default true), overridden to false in MergeJoin (PartialMergeJoin) and in JoinSwitcher (which can switch to PartialMergeJoin at runtime, so the plan-time decision must be conservative). HashJoin/DirectJoin/ConcurrentHashJoin stream the probe side and keep the order, so they are unaffected; GraceHashJoin/SpillingHashJoin were already excluded via hasDelayedBlocks().

Reproducer from #110662 (returned 3 mis-grouped rows, now returns the correct 10):

SELECT r.k, count() FROM t1 AS l RIGHT JOIN t2 AS r ON l.n = r.n
WHERE r.k < 10 GROUP BY r.k ORDER BY r.k
SETTINGS join_algorithm = 'partial_merge', query_plan_join_swap_table = 'true',
         optimize_aggregation_in_order = 1, max_threads = 1;

The bug is not swap-specific: a plain LEFT JOIN with join_algorithm='partial_merge' + optimize_aggregation_in_order=1 was equally wrong. The same defect family with optimize_distinct_in_order is #109216. Added 04500_read_in_order_through_partial_merge_join covering the swapped, non-swapped, and DISTINCT-in-order cases, and asserting the left ReadFromMergeTree no longer reads in order.

Version info

  • Merged into: 26.7.1.1171 (included in 26.7 and later)

PartialMergeJoin re-sorts left blocks by the join key (once per right
block), so it does not preserve the left stream's original order. The
read-in-order-through-join optimisation in optimizeReadInOrder.cpp was
propagating the left table's sorting-key order through it, so
Aggregating/Distinct-in-order then consumed a stream they wrongly
believed was sorted by the group/distinct key and mis-grouped rows.

Gate the propagation on a new IJoin::preservesLeftBlockOrder() (default
true), overridden to false in MergeJoin (PartialMergeJoin) and in
JoinSwitcher, which can switch to PartialMergeJoin at runtime. Fixes both
the swapped and non-swapped paths, and the DISTINCT-in-order variant.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. SELECT r.k, count() FROM t1 RIGHT JOIN t2 ON l.n=r.n WHERE r.k<10 GROUP BY r.k SETTINGS join_algorithm='partial_merge', query_plan_join_swap_table='true', optimize_aggregation_in_order=1, max_threads=1 returns 3 mis-grouped rows every run (also the plain non-swap LEFT variant, and the optimize_distinct_in_order variant). 100% in clickhouse-local.
b Root cause explained? optimizeReadInOrder.cpp::findReadingStep propagates the left table's sorting-key (k) read-in-order through any Inner/Left Any/All join with !hasDelayedBlocks(). PartialMergeJoin re-sorts left blocks by the join key n (once per right block), so its output is not ordered by k. Aggregating (in order) then consumes a stream it wrongly believes is sorted by the group key and merges rows into the wrong group.
c Fix matches root cause? Yes. Adds IJoin::preservesLeftBlockOrder() (default true), overridden to false in MergeJoin/JoinSwitcher, and gates the propagation on it. Targets the exact mechanism, not the symptom.
d Test intent preserved / new tests added? Added 04500_read_in_order_through_partial_merge_join covering swapped, non-swapped, and DISTINCT-in-order cases + an EXPLAIN assertion that the left read is no longer InOrder. No existing test weakened; all 7 existing read-in-order-through-join tests still pass.
e Both directions demonstrated? Yes. Pristine binary: wrong result + ReadType: InOrder. With fix: correct result + ReadType: Default. Verified by reverting/rebuilding (Build ID d91299 → 557f52).
f Fix is general across code paths? Yes. Single choke point (findReadingStep). GraceHashJoin/SpillingHashJoin already excluded via hasDelayedBlocks(); JoinSwitcher (can switch to partial_merge at runtime) is now conservatively excluded too. Not a symptom guard.
g Fix generalizes across inputs? Verified across RIGHT/LEFT/INNER, swap on/off, single- and multi-threaded, optimize_aggregation_in_order and optimize_distinct_in_order, Nullable keys. partial_merge result now matches hash exactly. hash/parallel_hash/full_sorting_merge/auto/grace were already correct and remain so.
h Backward compatible? Yes. No settings, formats, or defaults changed. Purely fixes an incorrect plan-time order assertion.
i Invariants and contracts preserved? Yes. Upholds the read-in-order optimization's contract that it only applies when the join preserves the left stream's order. Order-preserving joins keep the optimization; order-breaking ones no longer wrongly claim it.

Session id: cron:clickhouse-worker-slot-8:20260716-101500

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @vdimir @novikd — could you review this? It stops the read-in-order-through-join optimization from propagating the left table's sorting-key order through PartialMergeJoin, which re-sorts left blocks by the join key and so does not preserve that order. Aggregating/Distinct-in-order then mis-grouped rows (issues #110662, #109216). Gated on a new IJoin::preservesLeftBlockOrder(), false for MergeJoin and JoinSwitcher.

@clickhouse-gh

clickhouse-gh Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [19d6b8c]

Summary: ✅


AI Review

Summary

This PR now correctly stops optimizeReadInOrder from propagating left-side ordering through PartialMergeJoin and the JoinSwitcher path that may become PartialMergeJoin, and it keeps topKThroughJoin from deferring into second-pass cases that can never install read-in-order for explicit partial_merge or full_sorting_merge. I rechecked the current merged code, both prior review threads, the sibling join/order-sensitive optimizers, and the added stateless regressions; the previously reported regressions are addressed and I did not find any remaining correctness, safety, or evidence issues that require changes.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 16, 2026
topKThroughJoin defers to optimizeReadInOrder's second pass only when that
pass can actually stream read-in-order through the join. The deferral gate
already rejected reordering/delayed-block joins (grace, spilling), but not
partial_merge / prefer_partial_merge, which build a PartialMergeJoin that
re-sorts left blocks by the join key. Since the PR now rejects such joins in
the second pass via IJoin::preservesLeftBlockOrder(), an explicit
join_algorithm = 'partial_merge' with ORDER BY <preserved-side key> LIMIT n
took the deferral path and then lost BOTH optimizations.

Mirror the preservesLeftBlockOrder() contract in second_pass_can_apply so the
deferral fires only for order-preserving joins; otherwise topKThroughJoin
injects its own Sort + Limit. Cover it with the partial_merge variant of
04209_top_k_through_join_read_in_order_gate.sql.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Done in 5d859b9. The deferral gate now mirrors the order-preservation contract: added joinMayNotPreserveLeftBlockOrder() (physical join -> preservesLeftBlockOrder(); JoinStepLogical -> conservatively true when join_algorithms allows partial_merge/prefer_partial_merge) and AND-ed it into second_pass_can_apply. So an explicit partial_merge no longer takes the deferral path; topKThroughJoin injects its own Sort + Limit instead of losing both optimizations.

Covered by a partial_merge variant in 04209_top_k_through_join_read_in_order_gate.sql: EXPLAIN shows (Sorting=2, Limit=2) like through_join_off/spilling_on (was (1,1) before, both dropped), and the result-equivalence row matches.

full_sorting_merge builds a FullSortingMergeJoin. It preserves left block
order, but its physicalization inserts a Sort before JOIN on the preserved
input (addSortingForMergeJoin), and optimizeReadInOrder's findReadingStep does
not descend through a SortingStep, so read-in-order is never installed. As with
partial_merge, deferring to the second pass would silently disable both
topKThroughJoin and read-in-order for explicit full_sorting_merge queries with
ORDER BY <preserved-side key> LIMIT n.

Generalize joinMayNotPreserveLeftBlockOrder into joinDefeatsReadInOrderThroughJoin,
which also flags FULL_SORTING_MERGE (logical) and FullSortingMergeJoin (physical).
Add the full_sorting_merge EXPLAIN and result-equivalence variants to
04209_top_k_through_join_read_in_order_gate.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixed in 45e9ace. Extended the deferral gate to reject full_sorting_merge as well.

Mechanism differs from partial_merge: FullSortingMergeJoin preserves left block order (preservesLeftBlockOrder() == true), so the existing check does not catch it. But its physicalization inserts a Sort ... before JOIN on the preserved input (addSortingForMergeJoin, JoinStepLogical.cpp), and findReadingStep only descends through Expression/Filter/ArrayJoin/preliminary Distinct/CreatingSets steps, so it stops at that SortingStep and never installs requestReadingInOrder. Same "lose both optimizations" result as partial_merge.

Renamed the helper to joinDefeatsReadInOrderThroughJoin and generalized it: physical branch flags !preservesLeftBlockOrder() OR FullSortingMergeJoin; logical branch flags PARTIAL_MERGE / PREFER_PARTIAL_MERGE / FULL_SORTING_MERGE.

Verified via clickhouse-local (EXPLAIN gate on 04209):

  • baseline (this fix reverted): full_sorting_merge 3 1 -> limit_count=1, topKThroughJoin deferred, read-in-order never installed -> both lost.
  • with fix: full_sorting_merge 4 2 -> limit_count=2, topKThroughJoin injects its own Sort+Limit. Result equivalence row 10 999 990 matches the other algorithms.

Added the full_sorting_merge EXPLAIN + result-equivalence variants to 04209_top_k_through_join_read_in_order_gate.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 45e9ace

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. None are PR-caused (this PR only touches topKThroughJoin.cpp / optimizeReadInOrder.cpp; its own test 04209_top_k_through_join_read_in_order_gate passes).

Check / test Reason Owner / fixing PR
Stress test (arm_release) / Stream ... variant_discr ... is not found (STID 3190-62c4) crash (chronic Variant/Dynamic subcolumn serialization) #110204 (ours, open) — residual family fix; broader family fixed by merged #107562
Stateless (amd_llvm_coverage, old analyzer, s3, DBReplicated, WasmEdge, parallel, 2/3) / Server died + Unknown error server-died (chronic Int256*Float64 partial-result LOGICAL_ERROR under coverage lane) #109747 (ours, open)
LLVM Coverage / job error "Post Hooks" infra (trunk-wide coverage-aggregation flake, 25 PRs/2 master/50 hits in 3d) a fix task is created (investigating at full effort — fixing-PR link to follow here)
AST fuzzer (amd_msan) / job-level error infra (msan job setup/timeout, 2 PRs/0 master, no fuzzer finding) a fix task is created (investigating at full effort — fixing-PR link to follow here)

Session id: cron:our-pr-ci-monitor:20260717-003000

@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the AST fuzzer (amd_msan) job-level error: #110771. Root cause was a trunk regression in the AST fuzzer's own code (QueryFuzzer::fuzzExpressionList aborting on parametrized identifiers, introduced by #110228), not an msan setup/timeout error.

@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the LLVM Coverage job-level error: #110769. Root cause is a transient GitHub API 503 during praktika's GH-auth token-validation pre-step (ci/praktika/gh_auth.py, no retry) — not a Post Hooks / S3 issue; #110769 adds bounded retry on transient 5xx.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 45e9ace

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
Stress test (arm_release) / Stream A for column B not found (STID 3190-62c4) trunk (Variant/Dynamic subcolumn serialization, #3190 family) a fix task is moved to pending (investigating at full effort — fixing-PR link to follow here)
Stateless (amd_llvm_coverage, old analyzer, s3, DBReplicated, WasmEdge, parallel, 2/3) / Server died + Unknown error infra (WasmEdge/DBReplicated coverage job env) a fix task is created (investigating at full effort — fixing-PR link to follow here)
Integration tests (arm_binary, distributed plan, 3/4) / test_keeper_zookeeper_converter::test_multi_and_failed_requests[True] flaky (5 PRs / 1 master, 21d) a fix task is created (investigating at full effort — fixing-PR link to follow here)
AST fuzzer (amd_msan) (job-level; no test-level FAIL rows ingested) a fix task is created (investigating at full effort — fixing-PR link to follow here)

Session id: cron:our-pr-ci-monitor:20260717-070000

@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the `test_keeper_zookeeper_converter::test_multi_and_failed_requests[True]` flaky failure: #110631 (merged 2026-07-16 15:00 UTC, "Fix flaky genuine ZooKeeper startup in test_keeper_zookeeper_converter").

That check failed because this branch (45e9ace) was forked before #110631 merged, so the run predates the fix. Root cause: zkServer.sh start reports "FAILED TO START" (exit 1) if the JVM is not alive one second after launch (transient under CI host pressure), and a failed attempt leaves a stale PID file / lingering JVM so every naive retry keeps failing; #110631 now probes real ZooKeeper readiness and cleans up between attempts. Zero converter failures on master since it merged. Merging master into this branch picks it up.

… left key

Strengthens the 04500 regression with @ zlareb1's reported shape: uniqExact(l.k)
within GROUP BY l.k must equal 1 for every group. Directly detects mis-grouping
on the non-swap (query_plan_join_swap_table='false') path without relying on an
ordered reference. Issue ClickHouse#110662.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.10% 86.00% -0.10%
Functions 91.80% 91.80% +0.00%
Branches 78.20% 78.20% +0.00%

Changed lines: Changed C/C++ lines covered: 32/38 (84.21%) · Uncovered code

Full report · Diff report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 19d6b8c

CI fully finished on this head (Config Workflow = SUCCESS, Finish Workflow = SUCCESS, Mergeable Check = SUCCESS; 0 checks queued/in_progress; >20-min ingest buffer elapsed). CIDB shows ZERO failing tests for this commit (the strengthened zlareb1 plain-LEFT regression case is green).

Check / test Reason Owner / fixing PR
(no failing tests) - -
Sync - CH Inc sync (private, not actionable by us)

All checks green except the private CH Inc sync (exempt). No PR-caused failure.

Session id: cron:our-pr-ci-monitor:20260718-003000

@alexey-milovidov alexey-milovidov 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.

Okay.

@alexey-milovidov alexey-milovidov self-assigned this Jul 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 19, 2026
Merged via the queue into ClickHouse:master with commit 1b1ca95 Jul 19, 2026
178 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 19, 2026
@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

TL;DR

Do not propagate read-in-order through PartialMergeJoin

ClickGap verified: reproduced it with the script below on 26.6; tested 7 version(s) — 6 affected, 1 clean (see Affects); bisected to a candidate range — a single introducing PR could not be pinned (see Bisect).

Reproduction

CREATE TABLE l (k Int32, j Int32) ENGINE = MergeTree ORDER BY k;
CREATE TABLE r (j Int32) ENGINE = MergeTree ORDER BY j;
INSERT INTO l SELECT number % 50, number % 5 FROM numbers(4000);
INSERT INTO r SELECT number % 4 FROM numbers(3000);
-- Correct result is `1\t1\t50`; before the fix max(u) > 1 (rows mis-grouped
-- because read-in-order is wrongly propagated through PartialMergeJoin).
SELECT max(u), min(u), count() FROM (
    SELECT l.k, uniqExact(l.k) AS u FROM l LEFT JOIN r ON l.j = r.j GROUP BY l.k
)
SETTINGS join_algorithm = 'partial_merge', optimize_aggregation_in_order = 1, max_threads = 1;

▶ Run on ClickHouse Fiddle

Bisect

  • The bisect boundary was rejected — PR Support ALIAS columns in text index direct read optimization #103037 only modifies text index direct read optimization logic, while the bug involves read-in-order propagation through PartialMergeJoin and aggregation-in-order, which are completely unrelated subsystems. — a coincidental boundary, not the cause; no introducing PR pinned.

Affects

  • ✓ Fix is on master — this PR's change fixes the bug on master. Branches below still have the bug and need the backport.
  • Reproduces on: 26.6, 26.5, 26.4, 26.3, 26.2, 26.1
  • Does NOT reproduce on: master
  • Backport needed: 26.6, 26.5, 26.4, 26.3, 26.2, 26.1

Suggested next step

The bug reproduces as far back as the oldest tested release (26.1) and the only converged boundary is topically unrelated — this is a long-standing / pre-existing bug in comp-query-optimizer, not a recent regression; no introducing PR exists within the tested range.

Component: comp-query-optimizer
Severity: P2

cc fix PR author: @groeneai
cc fix PR reviewer: @alexey-milovidov


ClickGap · Finding: phase_d_pr110671

Triage metadata

  • Primary component: comp-query-optimizer
  • Secondary components: comp-joins, comp-testing
  • Component owners (comp-query-optimizer): @KochetovNicolai @davenger

@clickgapai

Copy link
Copy Markdown
Contributor

Hi — could this be a backport candidate for 26.6, 26.5, 26.4, 26.3 (LTS), 26.2, 26.1? No backport label was found, and the affected code appears to exist in those branches based on a file/function presence check.

Affected code: optimizeReadInOrder.cpp::findReadingStep read-in-order-through-join propagation — introduced in 25.12.

Why this might apply: query_plan_read_in_order_through_join defaults to true since compat 25.12 (SettingsChangesHistory.cpp:375), so the optimizeReadInOrder mis-grouping affects all supported branches 26.1-26.6. Wrong-results bug (silent mis-grouping) with partial_merge + optimize_aggregation_in_order/optimize_distinct_in_order. No backport label present on the PR.

Caveat: I verified that the modified code exists in those branches, but not whether the bug is actually reachable there — a new caller in master may be what makes this newly observable. If older branches can't reach the affected path, please ignore this; otherwise consider pr-must-backport or a version label like v26.6-must-backport.

alexey-milovidov pushed a commit that referenced this pull request Jul 26, 2026
Follow-up to #110671. The existing test covers the aggregation-in-order and
distinct-in-order read-in-order consumers through PartialMergeJoin, but not the
plain top-level ORDER BY consumer reported on #110662 as a no-aggregation
manifestation of the same bug (the ORDER BY was elided because the plan wrongly
trusted the partial_merge join output to be sorted by the left key).

The new case is self-checking: the 1:1 self-join over keys 0..499 must emit
range(500) when correctly sorted. It returns 0 on the pre-fix binary and 1 on
fixed master. The read-in-order planner gates are pinned on so the defective
path is always exercised; otherwise a run that randomizes them off would sort
correctly and pass without testing the fix.

Related: #110662
Related: #110671

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 28, 2026
The master merge in 58472f0 resolved src/Interpreters/IJoin.h by keeping
both declarations of the same virtual: the one that came in from master with
ClickHouse#110671 (default true) and this branch's fail-closed one (default false). That
is a redeclaration of a class member, so every translation unit that reaches
IJoin.h failed to compile:

  src/Interpreters/IJoin.h:187:18: error: class member cannot be redeclared
  src/Interpreters/IJoin.h:153:18: note: previous definition is here

Fast test and Build (arm_tidy) stopped at Dictionaries/DictionaryFactory.cpp.o
(reached via IDictionary.h -> JoinUtils.h -> IJoin.h) and every other job was
dropped.

Drop the inherited default and keep the fail-closed one, which is what this
branch generalizes ClickHouse#110671 to: a join advertises left-block-order preservation
only by opting in. The opt-ins (HashJoin, DirectKeyValueJoin, PasteJoin,
ConcurrentHashJoin when it does not scatter) and the explicit false overrides
that master kept on MergeJoin and JoinSwitcher are unchanged, so the resolved
behaviour is identical to this branch before the merge.

Also remove the two comment fragments the merge left stranded next to unrelated
declarations: the doc comment for preservesLeftBlockOrder ended up above
MergeJoin::addBlockToJoin, and the IJoin doc text now describes the actual
opt-in set instead of implying MergeJoin and JoinSwitcher rely on the default.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 28, 2026
The comment claimed the partial_merge assertion returned 1 before the fix. Measured on
a current master build, which already contains ClickHouse#110671, it returns 0, so that shape is
no longer the one this PR changes. Described as the coverage guard it actually is.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Follow-up to ClickHouse#110671. The existing test covers the aggregation-in-order and
distinct-in-order read-in-order consumers through PartialMergeJoin, but not the
plain top-level ORDER BY consumer reported on ClickHouse#110662 as a no-aggregation
manifestation of the same bug (the ORDER BY was elided because the plan wrongly
trusted the partial_merge join output to be sorted by the left key).

The new case is self-checking: the 1:1 self-join over keys 0..499 must emit
range(500) when correctly sorted. It returns 0 on the pre-fix binary and 1 on
fixed master. The read-in-order planner gates are pinned on so the defective
path is always exercised; otherwise a run that randomizes them off would sort
correctly and pass without testing the fix.

Related: ClickHouse#110662
Related: ClickHouse#110671

Co-Authored-By: Claude Opus 4.8 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…partial-merge-join-110662

Do not propagate read-in-order through PartialMergeJoin
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 pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong aggregation results: optimize_aggregation_in_order over a swapped partial_merge JOIN (rows mis-grouped)

5 participants