You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Design]: make join spill thresholds explicitly versioned and unit-safe #26434
Follow-up from #26408 and #26412. #26412 preserves the configured spill threshold across remote operator round-trips, but the threshold's legacy unit contract remains ambiguous.
Problem
The current compatibility rule interprets values <= 100000 as rows and values > 100000 as bytes. This makes the setting non-monotonic at the 100000 -> 100001 boundary and prevents callers, remote executors, configuration tooling, and diagnostics from knowing the unit from the value alone.
Changing the interpretation in place would break existing configurations and mixed-version clusters.
Proposed direction
Introduce a versioned threshold representation such as {value, unit, version}.
Normalize all internal admission logic to bytes, while retaining an explicit legacy-rows migration path.
Preserve the representation across plan serialization, remote execution, retries, prepared statements, and observability output.
Define mixed-version negotiation and fail-safe behavior for unknown versions/units.
Acceptance criteria
Values 0, 1, 100000, and 100001 have explicit, monotonic, documented behavior.
Legacy row-based configurations retain their old meaning through a tested migration layer.
New configurations never infer units from numeric magnitude.
Local/remote and mixed-version round-trip tests cover HashJoin, DedupJoin, and RightDedupJoin.
Logs and metrics report both normalized bytes and the original configured value/unit.
Invalid or unsupported units fail with a stable actionable error rather than silently changing policy.
Roadmap decision: #26563. Treat this as Phase 2 compatibility work, not a blocker for current correctness fixes. Start with 0/1/100000/100001 boundary tests, local/remote round-trip coverage, documentation of legacy magnitude inference, and original/resolved mode in EXPLAIN/operator stats. Add a minimal explicit unit only when an ambiguous value and a real mixed-version requirement are demonstrated; do not build a general version-negotiation framework preemptively.
Superseded by the concrete reproduction and root-cause evidence in #26924.
That issue establishes that the configured value reaches every worker, byte/row inference follows the current compatibility rule, the decision is per worker and pre-HashMap, and the displayed logical Join memory is not the threshold input. The remaining actionable scope is to make the resolved mode/value, build side, per-worker decision input, eligibility, decision, and reason observable before considering any semantic change.
#26924 is already transferred for testing and is intentionally not modified by this consolidation. Closing this broader version-negotiation design as superseded, not completed.
Activity
XuPeng-SH commentedon Aug 1, 2026
Roadmap decision: #26563. Treat this as Phase 2 compatibility work, not a blocker for current correctness fixes. Start with
0/1/100000/100001boundary tests, local/remote round-trip coverage, documentation of legacy magnitude inference, and original/resolved mode in EXPLAIN/operator stats. Add a minimal explicit unit only when an ambiguous value and a real mixed-version requirement are demonstrated; do not build a general version-negotiation framework preemptively.XuPeng-SH commentedon Aug 12, 2026
Superseded by the concrete reproduction and root-cause evidence in #26924.
That issue establishes that the configured value reaches every worker, byte/row inference follows the current compatibility rule, the decision is per worker and pre-HashMap, and the displayed logical Join memory is not the threshold input. The remaining actionable scope is to make the resolved mode/value, build side, per-worker decision input, eligibility, decision, and reason observable before considering any semantic change.
#26924 is already transferred for testing and is intentionally not modified by this consolidation. Closing this broader version-negotiation design as superseded, not completed.