Skip to content

refactor(sql): extract query scheduling rules - #25461

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:refactor_schedule_phase1_0705
Jul 6, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:refactor_schedule_phase1_0705

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Improvement
  • Code Refactoring

Which issue(s) this PR fixes:

What this PR does / why we need it:

This PR extracts SQL query scheduling logic out of compile.go into a dedicated pkg/sql/schedule package.

  • Move scheduling concerns for CN availability, scan planning, and placement into isolated modules (availability, placement, scan, types).
  • Add targeted tests for the new scheduler modules.
  • Keep behavior-compatible behavior for existing compile paths while lowering coupling and making future multi-CN scheduling rules easier to evolve.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH
XuPeng-SH merged commit 3db8ca2 into matrixorigin:main Jul 6, 2026
23 checks passed
@XuPeng-SH
XuPeng-SH deleted the refactor_schedule_phase1_0705 branch July 6, 2026 06:10
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [x] Improvement
- [x] Code Refactoring

## Which issue(s) this PR fixes:

-  matrixorigin#25451

## What this PR does / why we need it:

This PR extracts SQL query scheduling logic out of `compile.go` into a
dedicated `pkg/sql/schedule` package.

- Move scheduling concerns for CN availability, scan planning, and
placement into isolated modules (`availability`, `placement`, `scan`,
`types`).
- Add targeted tests for the new scheduler modules.
- Keep behavior-compatible behavior for existing compile paths while
lowering coupling and making future multi-CN scheduling rules easier to
evolve.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [x] Improvement
- [x] Code Refactoring

## Which issue(s) this PR fixes:

-  matrixorigin#25451

## What this PR does / why we need it:

This PR extracts SQL query scheduling logic out of `compile.go` into a
dedicated `pkg/sql/schedule` package.

- Move scheduling concerns for CN availability, scan planning, and
placement into isolated modules (`availability`, `placement`, `scan`,
`types`).
- Add targeted tests for the new scheduler modules.
- Keep behavior-compatible behavior for existing compile paths while
lowering coupling and making future multi-CN scheduling rules easier to
evolve.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [x] Improvement
- [x] Code Refactoring

## Which issue(s) this PR fixes:

-  matrixorigin#25451

## What this PR does / why we need it:

This PR extracts SQL query scheduling logic out of `compile.go` into a
dedicated `pkg/sql/schedule` package.

- Move scheduling concerns for CN availability, scan planning, and
placement into isolated modules (`availability`, `placement`, `scan`,
`types`).
- Add targeted tests for the new scheduler modules.
- Keep behavior-compatible behavior for existing compile paths while
lowering coupling and making future multi-CN scheduling rules easier to
evolve.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement kind/refactor Code refactor size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants