Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: BCE for the analyze #49726

Merged
merged 4 commits into from
Dec 25, 2023
Merged

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Dec 22, 2023

What problem does this PR solve?

Issue Number: close #49704

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

run go build -gcflags="-d=ssa/check_bce" ./pkg/executor/...

before:

pkg/executor/analyze.go:339:10: Found IsInBounds
pkg/executor/analyze_col_v2.go:207:46: Found IsInBounds
pkg/executor/analyze_col_v2.go:207:98: Found IsInBounds
pkg/executor/analyze_col_v2.go:382:41: Found IsInBounds
pkg/executor/analyze_col_v2.go:382:91: Found IsInBounds

after:

pkg/executor/analyze_col_v2.go:207:88: Found IsInBounds

gobench

 go test --tags=intest -run=^$ -bench=BenchmarkAnalyzePartition -benchmem github.com/pingcap/tidb/pkg/executor/test/analyzetest 

before

goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/executor/test/analyzetest
BenchmarkAnalyzePartition-8            1        33893337833 ns/op       16944721856 B/op        163173598 allocs/op
PASS
ok      github.com/pingcap/tidb/pkg/executor/test/analyzetest  42.219s

after

goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/executor/test/analyzetest
BenchmarkAnalyzePartition-8            1        32107453042 ns/op       16803604592 B/op        162345291 allocs/op
PASS
ok      github.com/pingcap/tidb/pkg/executor/test/analyzetest   39.637s

  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Dec 22, 2023
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

Merging #49726 (db84dea) into master (ecb4783) will increase coverage by 0.4234%.
Report is 7 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49726        +/-   ##
================================================
+ Coverage   70.9581%   71.3815%   +0.4234%     
================================================
  Files          1368       1427        +59     
  Lines        397092     415435     +18343     
================================================
+ Hits         281769     296544     +14775     
- Misses        95625     100104      +4479     
+ Partials      19698      18787       -911     
Flag Coverage Δ
integration 43.7669% <100.0000%> (?)
unit 70.9574% <ø> (-0.0007%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 47.1991% <ø> (-5.7050%) ⬇️

@hawkingrei
Copy link
Member Author

/retest

Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
@hawkingrei
Copy link
Member Author

/retest

Signed-off-by: Weizhen Wang <[email protected]>
Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 25, 2023
@hawkingrei
Copy link
Member Author

/retest

Copy link

ti-chi-bot bot commented Dec 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elsa0520, winoros

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 25, 2023
Copy link

ti-chi-bot bot commented Dec 25, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-25 03:35:09.935509414 +0000 UTC m=+1450400.972736341: ☑️ agreed by elsa0520.
  • 2023-12-25 05:32:01.257436379 +0000 UTC m=+1457412.294663307: ☑️ agreed by winoros.

@ti-chi-bot ti-chi-bot bot merged commit 9feb102 into pingcap:master Dec 25, 2023
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove BCE in the AnalyzeColumnsExec
3 participants