Repository navigation
perf(vector): hoist narrow selection destination bounds - #31620
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? |
|
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: a5580c963fa531bf945b69992cae11413ef72885
Assessment: request_changes
The specialization preserves existing ownership and copy semantics. One scoped performance-validation requirement remains incomplete; no correctness regression was established.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
- P2
docs/design/tpch-narrow-selected-copy.md:67: The scoped acceptance contract requires attributable target-query improvement and controls, but completed comparisons use baseline 6d1f5d7. Subsequent aggregation and integer-cast execution changes materially affect that benchmark boundary.
Impact: Performance acceptance remains unproven on the updated execution baseline. Finish the existing balanced SF10 Q1–Q22 comparison and relevant target/control confirmation on semantically matching builds, retaining valid completed evidence and reporting uncertainty. This is a validation gap, not a demonstrated slowdown.
Evidence: The PR body and linked issue #30845 comment 6475102215 explicitly report only one accepted current-baseline process pair and pending current-head acceptance. Frozen history confirms execution changes in group/exec2.go, group/helper.go and function/func_cast.go. Earlier component gains and green functional CI do not establish the required current-baseline query benefit.
Validation:
-
Reviewed the complete three-file delta, selection-test oracles, allocation/metadata owners, typed shuffle, BatchSet, ShufflePool and hash-join consumers.
-
Supplied exact-head CI reports successful build, UT, SCA, coverage and proxy/multi-CN BVT. Author-reported component results were retained within their stated scope.
-
Static audit passed: checks/1793211351136982656-4.json and review-audit.console.log confirm frozen identity, clean source, patch correspondence and complete discussion coverage. Initial newline-only audit mismatch is preserved in checks/1793211317657329811-4.json and review-audit-initial.console.log.
-
Saved review-plan.md, discussion-assessment.json and review-evidence.md in the diagnostic directory.
Limitations:
-
No local Go tests or TPC-H execution; local_validation is empty and raw author benchmark logs were not supplied.
-
Earlier Q7/Q14 slower estimates remain inconclusive, not confirmed regressions. Broader SF100/mixed-I/O issue closure is not independently required for this slice.
|
The performance-acceptance finding remains valid. The semantically matched full Q1–Q22 run and targeted same-binary-controlled follow-up are now complete, but they do not establish the required target-query benefit. A local implementation correction also improves component controls without demonstrating a TPC-H target win, so it has not been pushed. I have left this finding unresolved rather than treating green functional CI or component gains as acceptance. Detailed evidence: #30845 (comment) |
|
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: a5580c963fa531bf945b69992cae11413ef72885
Assessment: request_changes
The existing performance-acceptance requirement remains unmet after completed matched measurements. No separate correctness regression was established.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
docs/design/tpch-narrow-selected-copy.md:67: Accepting this performance-only specialization requires an attributable target-query improvement, which the completed published-head/base comparison and follow-up do not establish.
Impact: Component gains and green functional CI cannot satisfy the scoped acceptance contract. Revise or defer the specialization until a candidate demonstrates the required target gain with relevant controls; retain completed evidence rather than blindly repeating the full campaign.
Evidence: Issue #30845 comment 6478508972 reports the completed matched screen and A/A/B diagnostic, substantial same-binary variation, and no established target benefit. PR comment 6478510877 explicitly agrees that acceptance remains unresolved. The earlier incomplete-run rationale is superseded; reported slower signals are not proven PR-caused regressions.
Validation:
-
Reviewed the complete delta, copy/metadata/allocation owners, typed shuffle, BatchSet, ShufflePool, hashjoin consumers and test oracles.
-
Supplied exact-head CI reports successful build, UT, SCA, coverage and proxy/multi-CN BVT.
-
Static audit passed: frozen identity, clean source, patch correspondence, formatting and complete discussion coverage. Receipt checks/1793215883026438693-3.json matches review-audit.console.log.
Limitations:
-
No local Go tests or TPC-H execution; raw author benchmark logs were not supplied.
-
The unpushed alternative and historical prototype results do not qualify the assessed head.
fengttt
left a comment
There was a problem hiding this comment.
Style and comment change requests.
|
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: a5580c963fa531bf945b69992cae11413ef72885
Assessment: request_changes
The existing performance-acceptance requirement remains unmet. No additional correctness defect was established; the inline-comment request does not create a design-document gate.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
- P2
docs/design/tpch-narrow-selected-copy.md:67: This performance-only specialization requires attributable target-query improvement under issue #30845 and its scoped acceptance contract.
Impact: Completed matched measurements still do not establish that benefit. Revise or defer the specialization until a candidate meets the requirement with relevant controls, reusing completed evidence rather than blindly repeating the campaign.
Evidence: Linked issue comment 6478508972 reports the completed published-head/base comparison and controlled follow-up without established target benefit. PR comment 6478510877 acknowledges the unresolved requirement. The earlier incomplete-run rationale is superseded; slower signals are not proven PR-caused regressions.
Validation:
-
Reviewed the complete delta, copy/allocation/metadata owners, selection tests and BatchSet, ShufflePool and hash-join consumers.
-
Supplied exact-head CI reports successful build, UT, SCA, coverage and proxy/multi-CN BVT.
-
Static audit passed; receipt checks/1793240933846447013-7.json matches review-audit.log. Source remained unchanged; all nine discussion entries were assessed.
Limitations:
-
No local Go tests or TPC-H execution; raw benchmark and CI logs were not supplied.
-
The unpushed alternative does not qualify the assessed head.
|
Updated in d95cfbb. The earlier review correctly identified that the then-required attributable TPC-H gain was unproven. The author has now explicitly revised this component PR criterion: “if no regression, can still commit.” This changes the acceptance requirement; it does not establish a query speedup or waive a demonstrated regression. The implementation now uses first-row peeling and one tail bounds check rather than the private helper/two-view setup, and fixed constants share one checked output window. The completed full screen is retained as evidence for its measured bounded-loop variant; the subsequent changes have matched component controls and focused Q21 confirmation. No confirmed PR-caused slowdown was established in those final focused checks; Q21 remains inconclusive (+1.51%, 95% interval −6.48% to +1.73%). Measured source pins, same-binary variation, prior signals and evidence-reuse limits are disclosed in the final report. Functional/checkptr/consumer tests and final full pre-push SCA passed. CI on the new head is running. The requested inline explanation is present and the design document is removed from the PR delta. Issue #30845 remains open for the broader materialization work. Please reassess the new implementation under the author’s revised criterion; the previous CHANGES_REQUESTED reviews have not been dismissed. |
|
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: d95cfbb0e01ec4de281a1c9c002f949bf05713d7
Assessment: approve
The optimization preserves selection, payload and ownership contracts. The inline-comment request is resolved. The explicitly revised component acceptance criterion supersedes the earlier target-query-gain blocker; no actionable regression remains.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Reviewed the complete two-file delta, allocation/metadata/cleanup owners, BatchSet/ShufflePool and hash-join consumers, and test oracles.
-
Assessed all 14 discussion entries and all five linked-issue comments; saved review-plan.md and discussion-assessment.json.
-
Reused supplied exact-head successful build, Ubuntu UT/coverage, arm64 SCA and proxy/pessimistic multi-CN BVT evidence.
-
Reviewed reported component controls and Q21 follow-up within their stated scope; verified relevant vector inputs remained unchanged across the final merge.
-
Static audit passed: checks/1793267886661627793-2.json matches review-audit.log, confirming frozen identity, clean source, patch correspondence, formatting and discussion coverage.
Limitations:
-
No local Go tests or benchmarks were run; raw author performance artifacts were unavailable.
-
Q21 remains inconclusive, not proof of equivalence or speedup. The full Q1–Q22 screen measured the preceding variant; subsequent corrections have focused reported coverage. Broader issue #30845 remains open.
|
@fengttt Your comment and document requests are implemented in
The inline thread is resolved, required CI is green, and XuPeng-SH approved this exact head. Your review request is pending; please re-review the current implementation. The CHANGES_REQUESTED review remains in place for your decision. |
|
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: d95cfbb0e01ec4de281a1c9c002f949bf05713d7
Assessment: approve
No actionable defects found. Copy bounds, ordering, metadata and ownership remain intact. Inline-comment concerns are resolved; the explicit component scope supersedes the earlier query-speedup requirement.
Model: gpt-6-astra / xhigh
Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2
Validation:
-
Reviewed the complete two-file delta, affected owners/consumers and all 17 discussion entries; saved discussion-assessment.json.
-
Static audit passed: frozen patch/head match, clean source, diff checks, gofmt and unchanged relevant inputs across the final merge. Receipt: checks/1793353038436997783-2.json; log: static-audit.log.
-
Reused supplied head-matching successful build, Ubuntu UT/coverage, arm64 SCA and PROXY/PESS multi-CN BVT statuses.
Limitations:
-
No local Go tests or benchmarks executed; raw author performance artifacts and CI test logs were unavailable.
-
Final Q21 measurements are inconclusive, not proof of equivalence or speedup. The full 22-query screen covered the preceding variant; broader issue #30845 remains open.
🚫 Left the queue35 min in the queue, with no time running CI. So far
Reason Pull request #31620 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30845. This is the selected-copy component; the broader materialization issue remains open.
Final results, uncertainty and revised acceptance.
What this PR does / why we need it:
For flat, non-NULL four/eight-byte values,
Vector.UnionandUnionInt32copy the first selected row through checked scalar indexes. A one-row selection is then complete. For further rows, check the last destination byte once and derive row pointers only within that admitted interval. This removes repeated destination checks and avoids helper/slice-header setup on the short selections used by joins, while retaining source-index checks and copy order.Fixed constants reuse one checked append window for the first-value copy and existing doubling broadcast. Allocation/preflight, destination prefixes, NULL/grouping/provenance and length publication retain their existing owner. The existing selection test now covers additional logical types and floating-point NaN/signed-zero bits, both selector widths, windows, repetitions, prefixes and self-append through growth.
The inline comment distinguishes payload widths from selected-row counts. This change introduces no public API, dependency or build-option change.
Validation and performance
This component PR requires measured component gains and no confirmed PR-caused TPC-H regression. A query-level speedup is not claimed.
Vector package, focused checkptr and BatchSet consumers passed; unchanged evidence was reused.
Focused matched controls show component gains and no confirmed slowdown. Generated owner frames are eight bytes smaller.
The completed Q1–Q22 screen measures the preceding bounded-loop variant; the subsequent constant/first-row corrections have focused component and Q21 A/A/B coverage. Q21 is inconclusive: +1.51%, 95% interval −6.48% to +1.73%; identical-baseline variation is disclosed. This is not proof of equivalence or a TPC-H speedup claim.
Local comparison only; cache 16 GiB, whole-application budget 32 GiB, cold runs excluded. Benchmark results are consumed without input/result verification.
Final repository pre-push SCA passed, including molint, license checks and full golangci-lint (zero findings).