Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed the exact latest head. The parser/binder/prepare visitor/runtime closure is complete: ROWS markers remain typed plan expressions, alias-shared window expressions are visited once, cached operators materialize immutable per-Prepare frames from the current parameter vector, non-cached executions deep-copy before parameter replacement, remote processes preserve parameter bytes/binary flags, and Reset/Free close the generation boundary. Invalid NULL/negative/fractional/overflow/missing values fail before row processing. Generated parser output is byte-for-byte reproducible with zero new conflicts. Fresh affected-package tests, focused race x10, full window-package race, build, vet, diff checks, and the merge-tree against current main all pass; all PR CI checks are green. No blocking correctness, performance, or lifecycle issue found.
Prepared SET was rejected because the DCL carrier did not retain ordered parameter metadata and SET expression evaluation lost prepared context when it synthesized internal SELECT statements. This change collects parameters and schemas from retained SET expressions plus transient scalar-subquery plans, preserves global parser ordinals across multiple assignments, explicitly propagates prepared mode through initial and retry planning, bypasses invalid empty-SQL plan-cache keys for SET-derived AST inputs, and preserves decimal result binding. Supplemental aggregate/window traversal is idempotent with the generic visitor work in #26042 and #26094. The saved prepared AST and DCL plan remain immutable during EXECUTE. Text and binary repeated execution, multiple markers, NULL replacement, scalar/nested subqueries, aggregate/window fields, decimal expressions, cache isolation, and retry rebuilding are covered. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/sql/plan ./pkg/frontend` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestPreparedSet|TestSetExpression|TestPreparedSetExpression" -count=1 -timeout=240s ./pkg/frontend` Configured `go build` and `go vet` passed for planner/frontend. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. Approved by: @XuPeng-SH, @heni02
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25993 ## What this PR does / why we need it: Prepared statements could not parse `? PRECEDING/FOLLOWING` ROWS bounds, and window planning previously folded finite bounds before execution. This change preserves typed parameter expressions, visits and renumbers all window expressions without double-processing shared partition aliases, transports parameters unchanged, and materializes immutable operator-local ROWS frames once per `Prepare` generation. Dynamic RANGE and interval bounds remain explicitly unsupported. The runtime path rejects missing, NULL, negative, fractional, overflow, and failed-conversion bounds before processing rows. `Reset` and `Free` clear runtime frames, while cached plan expressions remain unchanged. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s ./pkg/sql/parsers/dialect/mysql ./pkg/sql/parsers/tree ./pkg/sql/plan ./pkg/sql/colexec/window ./pkg/vm/process` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestWindow(Prepare|Reset).*FrameBound" -count=1 -timeout=240s ./pkg/sql/colexec/window` Configured `go build` and `go vet` passed for all modified packages. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
Prepared SET was rejected because the DCL carrier did not retain ordered parameter metadata and SET expression evaluation lost prepared context when it synthesized internal SELECT statements. This change collects parameters and schemas from retained SET expressions plus transient scalar-subquery plans, preserves global parser ordinals across multiple assignments, explicitly propagates prepared mode through initial and retry planning, bypasses invalid empty-SQL plan-cache keys for SET-derived AST inputs, and preserves decimal result binding. Supplemental aggregate/window traversal is idempotent with the generic visitor work in matrixorigin#26042 and matrixorigin#26094. The saved prepared AST and DCL plan remain immutable during EXECUTE. Text and binary repeated execution, multiple markers, NULL replacement, scalar/nested subqueries, aggregate/window fields, decimal expressions, cache isolation, and retry rebuilding are covered. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/sql/plan ./pkg/frontend` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestPreparedSet|TestSetExpression|TestPreparedSetExpression" -count=1 -timeout=240s ./pkg/frontend` Configured `go build` and `go vet` passed for planner/frontend. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. Approved by: @XuPeng-SH, @heni02
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25993 ## What this PR does / why we need it: Prepared statements could not parse `? PRECEDING/FOLLOWING` ROWS bounds, and window planning previously folded finite bounds before execution. This change preserves typed parameter expressions, visits and renumbers all window expressions without double-processing shared partition aliases, transports parameters unchanged, and materializes immutable operator-local ROWS frames once per `Prepare` generation. Dynamic RANGE and interval bounds remain explicitly unsupported. The runtime path rejects missing, NULL, negative, fractional, overflow, and failed-conversion bounds before processing rows. `Reset` and `Free` clear runtime frames, while cached plan expressions remain unchanged. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s ./pkg/sql/parsers/dialect/mysql ./pkg/sql/parsers/tree ./pkg/sql/plan ./pkg/sql/colexec/window ./pkg/vm/process` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestWindow(Prepare|Reset).*FrameBound" -count=1 -timeout=240s ./pkg/sql/colexec/window` Configured `go build` and `go vet` passed for all modified packages. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
Prepared SET was rejected because the DCL carrier did not retain ordered parameter metadata and SET expression evaluation lost prepared context when it synthesized internal SELECT statements. This change collects parameters and schemas from retained SET expressions plus transient scalar-subquery plans, preserves global parser ordinals across multiple assignments, explicitly propagates prepared mode through initial and retry planning, bypasses invalid empty-SQL plan-cache keys for SET-derived AST inputs, and preserves decimal result binding. Supplemental aggregate/window traversal is idempotent with the generic visitor work in matrixorigin#26042 and matrixorigin#26094. The saved prepared AST and DCL plan remain immutable during EXECUTE. Text and binary repeated execution, multiple markers, NULL replacement, scalar/nested subqueries, aggregate/window fields, decimal expressions, cache isolation, and retry rebuilding are covered. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/sql/plan ./pkg/frontend` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestPreparedSet|TestSetExpression|TestPreparedSetExpression" -count=1 -timeout=240s ./pkg/frontend` Configured `go build` and `go vet` passed for planner/frontend. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. Approved by: @XuPeng-SH, @heni02
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25993 ## What this PR does / why we need it: Prepared statements could not parse `? PRECEDING/FOLLOWING` ROWS bounds, and window planning previously folded finite bounds before execution. This change preserves typed parameter expressions, visits and renumbers all window expressions without double-processing shared partition aliases, transports parameters unchanged, and materializes immutable operator-local ROWS frames once per `Prepare` generation. Dynamic RANGE and interval bounds remain explicitly unsupported. The runtime path rejects missing, NULL, negative, fractional, overflow, and failed-conversion bounds before processing rows. `Reset` and `Free` clear runtime frames, while cached plan expressions remain unchanged. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s ./pkg/sql/parsers/dialect/mysql ./pkg/sql/parsers/tree ./pkg/sql/plan ./pkg/sql/colexec/window ./pkg/vm/process` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestWindow(Prepare|Reset).*FrameBound" -count=1 -timeout=240s ./pkg/sql/colexec/window` Configured `go build` and `go vet` passed for all modified packages. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
Prepared SET was rejected because the DCL carrier did not retain ordered parameter metadata and SET expression evaluation lost prepared context when it synthesized internal SELECT statements. This change collects parameters and schemas from retained SET expressions plus transient scalar-subquery plans, preserves global parser ordinals across multiple assignments, explicitly propagates prepared mode through initial and retry planning, bypasses invalid empty-SQL plan-cache keys for SET-derived AST inputs, and preserves decimal result binding. Supplemental aggregate/window traversal is idempotent with the generic visitor work in matrixorigin#26042 and matrixorigin#26094. The saved prepared AST and DCL plan remain immutable during EXECUTE. Text and binary repeated execution, multiple markers, NULL replacement, scalar/nested subqueries, aggregate/window fields, decimal expressions, cache isolation, and retry rebuilding are covered. Tested with: `./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/sql/plan ./pkg/frontend` `./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestPreparedSet|TestSetExpression|TestPreparedSetExpression" -count=1 -timeout=240s ./pkg/frontend` Configured `go build` and `go vet` passed for planner/frontend. The distributed SQL fixture is included for CI; local `mo-tester` was unavailable. Approved by: @XuPeng-SH, @heni02
What type of PR is this?
Which issue(s) this PR fixes:
issue #25993
What this PR does / why we need it:
Prepared statements could not parse
? PRECEDING/FOLLOWINGROWS bounds, and window planning previously folded finite bounds before execution. This change preserves typed parameter expressions, visits and renumbers all window expressions without double-processing shared partition aliases, transports parameters unchanged, and materializes immutable operator-local ROWS frames once perPreparegeneration. Dynamic RANGE and interval bounds remain explicitly unsupported.The runtime path rejects missing, NULL, negative, fractional, overflow, and failed-conversion bounds before processing rows.
ResetandFreeclear runtime frames, while cached plan expressions remain unchanged.Tested with:
./.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s ./pkg/sql/parsers/dialect/mysql ./pkg/sql/parsers/tree ./pkg/sql/plan ./pkg/sql/colexec/window ./pkg/vm/process./.agents/skills/mo-dev/scripts/mo-cgo-test -race -run "TestWindow(Prepare|Reset).*FrameBound" -count=1 -timeout=240s ./pkg/sql/colexec/windowConfigured
go buildandgo vetpassed for all modified packages. The distributed SQL fixture is included for CI; localmo-testerwas unavailable.