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
[Compatibility]: prepared RANGE window-frame bounds reject parameter markers #28022
Related fix: PR #28065, fix(window): support prepared RANGE frame parameters, merge commit d0ad7968561f205bc2f4020ba0c37aca886d621e; it is reachable from the validated main baseline.
Topology: test-owned local LOG + TN + CN; MOTR used MySQL/TCP at 127.0.0.1:26001.
Endpoint coverage: the local CN endpoint 127.0.0.1:26001 was covered through MySQL/TCP. Standard multi-CN endpoints 127.0.0.1:16001, 127.0.0.1:16002, and Proxy 127.0.0.1:6001 were not covered; the existing :6001 listener was a non-baseline Docker container and was deliberately not used.
Client protocol: MySQL/TCP through MOTR. Focused binder/window unit tests were reused from built main commit bf63172c0691e917ed2613c2d3a2d3d76a7f682e: the range to refreshed main changes only docs/rfcs/, pkg/frontend/routine_test.go, and pkg/sql/plan/shuffle*, leaving the PR fix(window): support prepared RANGE frame parameters #28065 binder/window/distributed-prepare surface unchanged.
What Was Covered
OK — focused planner binder tests passed for parameterized RANGE single bounds, both bounds, numeric ORDER BY validation, and unsupported interval markers.
OK — focused window execution tests passed for RANGE parameter materialization, valid and invalid execute-time bounds, and aggregate consumption.
OK — original PREPARE ... RANGE ? PRECEDING succeeded; EXECUTE with bound 2 returned the expected value-based rolling sums.
OK — reusing the same prepared statement with bound 3 changed the value range at execute time, proving it did not retain the previous bound.
OK — literal RANGE 2 PRECEDING produced the same result as the prepared bound 2 control.
OK — prepared ROWS ? PRECEDING remained supported as a non-equivalent compatibility control.
OK — RANGE BETWEEN ? PRECEDING AND ? FOLLOWING accepted and applied both markers.
OK — negative prepared bound was rejected at EXECUTE with 20301, window RANGE frame bound must be a finite non-negative numeric value.
OK — MOTR record and replay both passed through MySQL/TCP: 25 statements, 25 successful, 0 failed.
Not covered — multi-CN/Proxy routing through CN1:16001, CN2:16002, and Proxy :6001; this parser/binder/execution contract has no topology-dependent branch.
Findings
PR #28065 restores the public contract: numeric parameter markers in RANGE frame bounds are accepted during PREPARE, materialized per EXECUTE, and validated at execution time. The negative-bound result confirms validation moved to the correct phase rather than being deferred into execution without validation.
Large-data regression is not needed. The affected contract is bound parsing, binding, and per-execution materialization; it is independent of row count, block/batch boundaries, memory/spill, concurrency, skew, network transfer, and resource scale.
MOTR / BVT Coverage
Branch: test/issue-28022-prepared-range-frame.
Commit: d59d5b1 — test: add MOTR regression for #28022.
Files: suites/14_issue_regression/t/issue_28022_prepared_range_frame.test and suites/14_issue_regression/r/issue_28022_prepared_range_frame.result.
Record and replay completed successfully against the test-owned latest-main-equivalent CN endpoint.
The branch push is pending because the Git transport did not complete during this run; no issue-specific PR was created.
Final Conclusion
Fixed on refreshed origin/main99ed717b769e261b842c2f17345bd65865fc1470. No large-data regression is required because the defect is data-size independent.
Activity
Ariznawlll commentedon Sep 2, 2026
补充 latest main 验证(
3ec2c2524f88cb3365b9bc464d02458c9a77798a):RANGE ? PRECEDING在PREPARE阶段连续 3 次返回同一“不支持 prepared parameter markers”错误。ROWS ? PRECEDING三次均可执行;字面量RANGE 1 PRECEDING也返回正确滚动结果。SUM(v)=60,随后字面量RANGE查询仍可正常执行;拒绝未改变数据或损坏会话。fix(window): support prepared RANGE frame parameters (#28065)
slyunnn commentedon Sep 4, 2026
Regression and extended verification for #28022 (2026-09-04)
Verification Environment
origin/main:99ed717b769e261b842c2f17345bd65865fc1470—test(frontend): make reset cancellation deterministic (#28105).fix(window): support prepared RANGE frame parameters, merge commitd0ad7968561f205bc2f4020ba0c37aca886d621e; it is reachable from the validated main baseline.LOG + TN + CN; MOTR used MySQL/TCP at127.0.0.1:26001.127.0.0.1:26001was covered through MySQL/TCP. Standard multi-CN endpoints127.0.0.1:16001,127.0.0.1:16002, and Proxy127.0.0.1:6001were not covered; the existing:6001listener was a non-baseline Docker container and was deliberately not used.bf63172c0691e917ed2613c2d3a2d3d76a7f682e: the range to refreshed main changes onlydocs/rfcs/,pkg/frontend/routine_test.go, andpkg/sql/plan/shuffle*, leaving the PR fix(window): support prepared RANGE frame parameters #28065 binder/window/distributed-prepare surface unchanged.What Was Covered
RANGEsingle bounds, both bounds, numericORDER BYvalidation, and unsupported interval markers.RANGEparameter materialization, valid and invalid execute-time bounds, and aggregate consumption.PREPARE ... RANGE ? PRECEDINGsucceeded;EXECUTEwith bound2returned the expected value-based rolling sums.3changed the value range at execute time, proving it did not retain the previous bound.RANGE 2 PRECEDINGproduced the same result as the prepared bound2control.ROWS ? PRECEDINGremained supported as a non-equivalent compatibility control.RANGE BETWEEN ? PRECEDING AND ? FOLLOWINGaccepted and applied both markers.EXECUTEwith20301,window RANGE frame bound must be a finite non-negative numeric value.25statements,25successful,0failed.CN1:16001,CN2:16002, and Proxy:6001; this parser/binder/execution contract has no topology-dependent branch.Findings
PR #28065 restores the public contract: numeric parameter markers in
RANGEframe bounds are accepted duringPREPARE, materialized perEXECUTE, and validated at execution time. The negative-bound result confirms validation moved to the correct phase rather than being deferred into execution without validation.Large-data regression is not needed. The affected contract is bound parsing, binding, and per-execution materialization; it is independent of row count, block/batch boundaries, memory/spill, concurrency, skew, network transfer, and resource scale.
MOTR / BVT Coverage
test/issue-28022-prepared-range-frame.d59d5b1—test: add MOTR regression for #28022.suites/14_issue_regression/t/issue_28022_prepared_range_frame.testandsuites/14_issue_regression/r/issue_28022_prepared_range_frame.result.Final Conclusion
Fixed on refreshed
origin/main99ed717b769e261b842c2f17345bd65865fc1470. No large-data regression is required because the defect is data-size independent.fix(window): support prepared RANGE frame parameters (matrixorigin#28065
fix(window): support prepared RANGE frame parameters (matrixorigin#28065
fix(window): support prepared RANGE frame parameters (matrixorigin#28065