Repository navigation
fix time window units - #27012
fix time window units#27012
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 review on exact head cdbd109: APPROVE.
The planner now rejects unsupported INTERVAL and SLIDING units before helper binding and before a TIME_WINDOW plan can reach constructTimeWindow, while preserving the executor capability set (SECOND/MINUTE/HOUR/DAY). I traced the full parser -> binder -> plan node -> compile -> timewin path and checked all parser-reachable interval categories; no correctness blocker found.
Validation:
- CI is green on this exact head.
- pkg/sql/plan full package tests pass.
- pkg/sql/colexec/timewin and pkg/sql/compile tests pass.
- pkg/sql/plan build and vet pass.
- Reviewer-only public parser->BuildPlan matrix passed for all four supported units, all 16 other recognized interval units, and unsupported SLIDING units; the temporary test was removed.
- Q1-Q3 unhappy-path audit: no new resource ownership, wait-for, or unbounded-growth edge.
aptend
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head cdbd109. The planner-side unit validation rejects every unit the time-window executor cannot represent before the compile path, covers both INTERVAL and SLIDING, preserves the executor fallback, and adds focused unit/BVT coverage. Focused planner tests pass locally with the required CGO/thirdparties setup; GitHub CI is green. No blocking issue found.
Merge Queue Status
This pull request spent 28 minutes 19 seconds in the queue, with no time running CI. ReasonPull request #27012 has been merged manually at bd34211 HintYou were too fast! Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26980 ## What this PR does / why we need it: • 此分支当前主要修改了 time-window 不支持时间单位的错误路径: - 在 planner/binder 阶段提前校验 INTERVAL/SLIDING 的单位,只允许 SECOND/MINUTE/HOUR/DAY。 - 对 MONTH/WEEK/YEAR/QUARTER 返回普通 not supported SQL 错误,避免进入 compile 阶段触发 panic in compile 日志。 - 保留执行器侧原有 unsupported 兜底逻辑,但正常 SQL 已不会走到 compile panic-path。 - 补充单测覆盖: - interval(..., month/week/year/quarter) - sliding(..., month/week/year/quarter) - validator 对非法 unit 字符串的处理。 - 补充 BVT 覆盖上述 SQL 错误路径,并移除了 parser 直接拒绝的 century case。 验证已通过目标 Go 测试和 git diff --check。 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26980 ## What this PR does / why we need it: • 此分支当前主要修改了 time-window 不支持时间单位的错误路径: - 在 planner/binder 阶段提前校验 INTERVAL/SLIDING 的单位,只允许 SECOND/MINUTE/HOUR/DAY。 - 对 MONTH/WEEK/YEAR/QUARTER 返回普通 not supported SQL 错误,避免进入 compile 阶段触发 panic in compile 日志。 - 保留执行器侧原有 unsupported 兜底逻辑,但正常 SQL 已不会走到 compile panic-path。 - 补充单测覆盖: - interval(..., month/week/year/quarter) - sliding(..., month/week/year/quarter) - validator 对非法 unit 字符串的处理。 - 补充 BVT 覆盖上述 SQL 错误路径,并移除了 parser 直接拒绝的 century case。 验证已通过目标 Go 测试和 git diff --check。 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26980 ## What this PR does / why we need it: • 此分支当前主要修改了 time-window 不支持时间单位的错误路径: - 在 planner/binder 阶段提前校验 INTERVAL/SLIDING 的单位,只允许 SECOND/MINUTE/HOUR/DAY。 - 对 MONTH/WEEK/YEAR/QUARTER 返回普通 not supported SQL 错误,避免进入 compile 阶段触发 panic in compile 日志。 - 保留执行器侧原有 unsupported 兜底逻辑,但正常 SQL 已不会走到 compile panic-path。 - 补充单测覆盖: - interval(..., month/week/year/quarter) - sliding(..., month/week/year/quarter) - validator 对非法 unit 字符串的处理。 - 补充 BVT 覆盖上述 SQL 错误路径,并移除了 parser 直接拒绝的 century case。 验证已通过目标 Go 测试和 git diff --check。 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #26980
What this PR does / why we need it:
• 此分支当前主要修改了 time-window 不支持时间单位的错误路径:
在 planner/binder 阶段提前校验 INTERVAL/SLIDING 的单位,只允许 SECOND/MINUTE/HOUR/DAY。
对 MONTH/WEEK/YEAR/QUARTER 返回普通 not supported SQL 错误,避免进入 compile 阶段触发 panic in compile 日志。
保留执行器侧原有 unsupported 兜底逻辑,但正常 SQL 已不会走到 compile panic-path。
补充单测覆盖:
补充 BVT 覆盖上述 SQL 错误路径,并移除了 parser 直接拒绝的 century case。
验证已通过目标 Go 测试和 git diff --check。