Repository navigation
feat: support prepared and sortable discrete percentiles - #28540
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? |
c291a33 to
4382ffd
Compare
4382ffd to
351c136
Compare
|
Resolved the latest main conflict at 3147b5b after preserving the remote branch updates and merging upstream/main through 2ea4ec2. The monotonic MORPC chain now keeps main at v69-v72, widened DECIMAL SUM at v73, and extended discrete-percentile inputs at v74. Constants, gates, validation errors, compatibility tests, rollout guidance, and the design document were updated consistently. The exact design revision for renewed approval is 3147b5b. Local aggregate/group/window/compile/plan/frontend/process regression tests passed, followed by the complete native-provenance-aware make build. |
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed exact head 3147b5b against base 2ea4ec2, including its integrated #28624 dependency. I approve the updated design at this exact revision and the implementation for its stated scope. Merge #28624 first, then this PR.
The previous protocol collision is resolved: main's complete prefix through v72 is retained, widened SUM uses v73, and extended discrete percentiles use v74. I verified the core SUM/group compatibility files match current #28624. The earlier independent design approval remains applicable to the retained ownership/typing model; the current rollout revision explicitly names the dependency and new allocations.
Inspected the full extension design, saved-string framing/provenance, generic discrete executor and cleanup, merge compatibility, allocation-accounted retained values/selectors, JSON/array exclusion at planner/executor admission, prepared ordinary/runtime compile-cache rejection, config preflight before child-scope construction, legacy numeric v17 and extended v74 gates, and their regression/BVT oracles. Raw metadata-magic lookalikes are unambiguous because all retained strings carry an envelope. Invalid/NULL then valid prepared-percentile executions have clean per-execution config.
No remaining confirmed blocker. Current-head CI is green. Reused earlier independent focused evidence and semantically unchanged review results; no fresh native suite, GPU, mixed-version deployment or benchmark run. JSON/array support and real release upgrade/downgrade qualification remain outside this approval's claims.
|
Investigated the failing Ubuntu/x86 UT check. It contains no failed test assertion: the unsharded race suite reached its global timeout after 71m41s ( Merged current New CI: https://github.com/matrixorigin/matrixone/actions/runs/34973047670
|
# Conflicts: # pkg/defines/const.go
|
Resolved the conflict with current The conflict was an MORPC version allocation collision. New exact head: Validation passed:
|
|
Updated the PR head to 3d74413 by merging current main (26fa8c3). Failure analysis:
Local verification:
Both passed. A new CI run has been triggered for the updated head. |
|
Updated again at head 762ac35 by merging current main (01d60e1). Final state of the previous run:
Ubuntu UT diagnostics:
Current main now includes #28936, which removes fixed lifecycle wait overhead, improves UT report execution, and runs the 20 independent DataBranchDiff scenarios with bounded parallelism. It landed after the failed run and its own full CI passed. Local verification at the new head:
The MORPC v76 gate for this PR remains intact. A fresh CI run is now triggered. |
|
Updated head: 951ab6e. Merged current main (8a4c84f) and resolved the aggregate-state/compiler/protocol conflicts. Extended PERCENTILE_DISC now uses MORPC v81 without reusing main's v76-v80 gates. Prepared APPROX_PERCENTILE keeps main's explicit DESC configuration and SQL NaN ordering. The PR compatibility description and design revision were updated accordingly. The failed fulltext2_copy_alter.sql query was reproduced with two independent CN processes: the original case passes on the CDC writer CN but returns no rows for neutrino on the other CN (expected IDs 100 and 101). The test had warmed the replacement base before inserting new rows and assumed that a durable CDC tail also refreshed a remote CN's cache. That assumption contradicts the existing eventual-consistency cache contract. The fix retains the original COPY ALTER/base/prewarm assertions and checks post-ALTER CDC on a separate replacement index that has not been searched. It also waits for cdc_tail chunk_id to advance beyond the pre-insert value and retains the expected 100/101 and 1/3/5 results, with an added base-table oracle. No fixed sleep, skipped assertion, forced rebuild, or production cache-consistency change was added. Validation: make build; complete tests for aggexec, group, compile, plan, frontend, plan/function and fulltext2; cache/TVF regression tests repeated 3 times; corrected COPY ALTER BVT passed 4 runs across both CNs (47/47 assertions each); 4 percentile BVT scripts passed in the repository's CI mode (67/67 assertions). GitHub reports mergeable=true. New CI run 35073833897 has been triggered and is not yet complete. Coverage and CI Required on the previous head were downstream failures of the Compose BVT, not a coverage percentage failure. |
# Conflicts: # pkg/defines/const.go # pkg/sql/compile/compile.go # pkg/sql/compile/operator.go
Merge Queue Status
This pull request spent 6 minutes 36 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Follow-up for issue #25110.
What this PR does / why we need it:
This completes the two highest-priority ordered-set percentile follow-ups discussed in #25110:
pinAPPROX_PERCENTILE,PERCENTILE_CONT, andPERCENTILE_DISC; the parameter is fixed perEXECUTE, while column/per-row percentile expressions remain rejected;PERCENTILE_DISCfrom numeric-only input to allocation-accounted SQL-sortable scalar types, including VARCHAR, DATE, UUID, and DECIMAL256, while retaining the numeric interpolation restrictions ofPERCENTILE_CONT; JSON and array/vector inputs remain rejected until their O(N) sorter scratch is allocator-aware;Ordered-set window functions remain outside this PR.
Compatibility and merge dependency
7795d61a06, indocs/design/20260910-prepared-and-discrete-percentiles.md.Validation
make buildgo test ./pkg/sql/colexec/aggexec ./pkg/sql/colexec/group ./pkg/sql/colexec/window ./pkg/sql/colexec/partition ./pkg/sql/colexec/hashjoin ./pkg/sql/compile ./pkg/sql/plan ./pkg/sql/plan/function ./pkg/frontend ./pkg/vm/process -count=1pvalues, preparedPERCENTILE_CONT/APPROX_PERCENTILE, and VARCHAR/DATE/DECIMAL256PERCENTILE_DISC