Repository navigation
Return empty RANGE frames for temporal PRECEDING underflow - #33212
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
20fabd4 to
e31ff0d
Compare
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: e31ff0d60a0016f15cf5b72c55b2fad2dbb3ce74
Assessment: approve
No actionable regression found. The fix reuses the existing temporal bound searches and propagates an empty-frame marker to aggregate and value-window consumers, including the TIMESTAMP fold path. The added year-zero classification runs only after temporal subtraction fails and preserves the existing end-bound validation and ordinary RANGE paths.
Model: gpt-6.1-terra / max
Session: 01a21136-dc54-7ba1-aace-4039c02570be · slot 2 · generation 3
Validation:
-
Reviewed the complete change, temporal arithmetic and interval normalization, sliding aggregate and value-window consumers, and the linked issue's controls. The current-head CI snapshot reports successful Ubuntu/x86 unit and coverage jobs and shared build.
-
The PR reports a same-head SQL integration pass and MySQL 8.0.46 comparisons for DATE, DATETIME and TIMESTAMP, with in-domain, DESC, FOLLOWING and invalid-end controls.
-
Private /tmp and loopback preflight and git diff --check passed; see preflight.log, diff-check.log and their checks/ receipts. All three discussion entries are accounted for in discussion-assessment.json.
Limitations:
-
No local Go tests were run: the native build was stopped after matching current-head CI evidence was confirmed. The reported external MySQL comparison was not independently reproduced, and its raw logs were not supplied.
-
The optional MySQL warning for arithmetic overflow remains unimplemented, as disclosed in the PR and permitted by the linked issue.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
An ascending temporal
RANGEwindow can include the partition prefix when anINTERVAL ... PRECEDINGstart bound underflows. ForDATE,DATETIME, andTIMESTAMPkeys, the frame is now empty when the start arithmetic producesNULLand the end bound is valid.COUNT(*)returns 0, whileSUMandAVGreturnNULL.The window executor checks the temporal domain before classifying a failed subtraction as underflow. It still validates the end bound and propagates any error before returning the empty frame. The empty-frame marker also prevents a
TIMESTAMPframe from being populated during daylight-saving fold evaluation.TestWindowTemporalIntervalsSQL integration test. Incremental formatting, vet, and lint checks passed in both affected packages.FOLLOWINGcontrols, the existing temporal window fixture results, and error 20203 for an invalid end bound.DATEprobe, MySQL 8.0.46 returned zero counts throughout a partition after the earliest row underflowed. MatrixOne evaluates underflow per row and preserves its existing results for subsequent in-range rows.CI repair in
20fabd462e9f89e33988037611facc0988b4a279pkg/container/types(includingTestTypeSwitchFamilies) andpkg/sql/colexec/windowusingmo-cgo-test -short -tags matrixone_test -covermode=set -count=1. Formatting, incremental vet and lint, and the PR artifact check passed.20fabd462e9f89e33988037611facc0988b4a279. UT Coverage, coverage aggregation Prior coverage UT jobRace UT refresh in
e31ff0d60a0016f15cf5b72c55b2fad2dbb3ce74TestIssue29492MultiCNCancellationCleanup/binary. The runner later reached its two-hour UT limit. The rebase includes the upstream split between the cancellation and replay budgets and the new pre-deadline replay diagnostics. All four PR patches are unchanged by range-diff. Race UT job, upstream test updatemo-cgo-test -race -short -tags matrixone_test -count=1passed the cancellation test in text and binary modes and the replay diagnostics test. The type and window packages passed with coverage, andTestWindowTemporalIntervalspassed through SQL. Formatting, incremental vet and lint, and the artifact check passed.