Repository navigation
fix sub-second units - #27017
fix sub-second units#27017
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? |
aptend
left a comment
There was a problem hiding this comment.
Deep re-review completed on exact head 90a79c3. The prior scale-0 metadata and low-scale microsecond-collapse blockers are closed end to end: MICROSECOND windows promote boundary FSP to 6, planner/TIME_WINDOW/FILL projections agree, runtime boundary vectors preserve the timestamp/datetime type and scale, and public scale-0/3/6 plus CTAS coverage verifies one-microsecond width and materialized DATETIME(6). Focused planner, timewin, and function tests pass with the required CGO/thirdparties setup; current CI is green and git diff --check is clean. The unrelated comprimary_key.result refresh remains a non-blocking cleanup item.
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed exact head 90a79c3. The microsecond interval conversion, timestamp boundary representation, FSP promotion, zero and NULL handling, and planner to runtime metadata agree. Focused interval, truncate, time-window executor, planner, CTAS, and function tests pass.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 90a79c3d8ae3bd4d77bde8989369cec1fe65c76a.
The previous blocking issue is closed: microsecond windows now promote public boundaries to fractional scale 6 for DATETIME/TIMESTAMP inputs at source scales 0/3/6, the runtime boundary vectors preserve the temporal OID and FSP, and CTAS keeps the resulting metadata. I also checked the DATE/TIMESTAMP execution path, interval validation, zero sentinels, sliding/partition behavior, and buffer reuse.
Local verification passed:
- GOWORK=off go list/build/vet for ./pkg/sql/colexec/timewin, ./pkg/sql/plan/function, ./pkg/sql/plan
- focused microsecond/scale/runtime/CTAS regression tests
- full tests for all three affected packages via mo-cgo-test
The unrelated comprimary_key.result refresh should still be removed to keep the PR focused, but I do not see it masking a correctness regression, so it is non-blocking.
LeftHandCold
left a comment
There was a problem hiding this comment.
There are two merge-blocking issues:
-
[P1] Preserve the reused boundary vector when appending fails (
pkg/sql/colexec/timewin/timewin.go:751,:813-814, and the analogous end-vector path).calResassigns the helper return directly toctr.startVec/ctr.endVec, whilemakeWindowBoundaryVecreturns(nil, err). On a later flush, a reused vector still owns its existing mpool buffer afterCleanOnlyData; if growth fails, the assignment overwrites the only owner with nil and the buffer can no longer be freed by Reset/Free. Please retain/return the vector on error (or keep ownership in the caller) and add a failing-allocation regression. -
[P1] Revert the unrelated
test/distributed/cases/ddl/comprimary_key.resultrewrite. The corresponding SQL is unchanged, but this patch changes the output protocol and even turns negative key values into positive ones (for example around lines 21-35). This will make that independent BVT golden disagree with its real results and is outside the time-window change.
|
Updated in e8447cf. Changes made for the latest review:
Validation run locally:
Please review again. Thanks. |
What type of PR is this?
Which issue(s) this PR fixes:
issue #26983
What this PR does / why we need it:
此分支主要支持 Time Window 的 MICROSECOND 亚秒窗口。
修改内容: