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

expression: avoid slicesgrow in the extractBinaryOpItems #59320

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Feb 7, 2025

What problem does this PR solve?

Issue Number: close #59319

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Feb 7, 2025
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 7, 2025
@@ -821,7 +821,7 @@ func ComposeDNFCondition(ctx BuildContext, conditions ...Expression) Expression
}

func extractBinaryOpItems(conditions *ScalarFunction, funcName string) []Expression {
var ret []Expression
ret := make([]Expression, 0, len(conditions.GetArgs()))
Copy link
Member Author

Choose a reason for hiding this comment

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

Although it cannot be completely eliminated, it is better than nothing.

Copy link
Member

@YangKeao YangKeao 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 7, 2025
Copy link

ti-chi-bot bot commented Feb 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XuHuaiyu, YangKeao

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

Copy link

ti-chi-bot bot commented Feb 7, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-07 09:44:42.504633791 +0000 UTC m=+4124.900855855: ☑️ agreed by XuHuaiyu.
  • 2025-02-07 09:46:11.841841599 +0000 UTC m=+4214.238063660: ☑️ agreed by YangKeao.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.4768%. Comparing base (4734c9c) to head (4800b84).
Report is 5 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59320        +/-   ##
================================================
+ Coverage   73.0474%   73.4768%   +0.4293%     
================================================
  Files          1689       1690         +1     
  Lines        467010     467391       +381     
================================================
+ Hits         341139     343424      +2285     
+ Misses       104891     102988      -1903     
+ Partials      20980      20979         -1     
Flag Coverage Δ
integration 43.0010% <ø> (?)
unit 72.2337% <ø> (-0.0042%) ⬇️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.4316% <ø> (+0.0086%) ⬆️

@ti-chi-bot ti-chi-bot bot merged commit f7759f5 into pingcap:master Feb 7, 2025
22 of 24 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avoid slicesgrow in the expression.extractBinaryOpItems
3 participants