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: optimize load data assignment expressions #46082

Merged
merged 4 commits into from
Aug 15, 2023

Conversation

gengliqi
Copy link
Contributor

@gengliqi gengliqi commented Aug 14, 2023

What problem does this PR solve?

Issue Number: close #46081

Problem Summary:
See #46081.

What is changed and how it works?

Calling rewriteAstExpr only once for each expression. Then evaluating these expressions for each row.

Check List

Tests

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

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.

Optimize load data assignment expressions

Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 14, 2023
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-6.5@361fe40). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-6.5     #46082   +/-   ##
================================================
  Coverage               ?   73.6677%           
================================================
  Files                  ?       1083           
  Lines                  ?     347543           
  Branches               ?          0           
================================================
  Hits                   ?     256027           
  Misses                 ?      75070           
  Partials               ?      16446           

Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

can we have a test on cpu perf before/after this pr?

rest lgtm

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Aug 15, 2023
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

And should add some tests

executor/load_data.go Outdated Show resolved Hide resolved
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 15, 2023
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@gengliqi gengliqi changed the title load data: optimize assignment expressions executor: optimize load data assignment expressions Aug 15, 2023
@gengliqi gengliqi requested a review from windtalker August 15, 2023 08:37
Copy link
Contributor

@windtalker windtalker 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 the lgtm label Aug 15, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, windtalker

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:
  • OWNERS [D3Hunter,windtalker]

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 15, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 15, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-15 03:22:23.074150689 +0000 UTC m=+601307.623166661: ☑️ agreed by D3Hunter.
  • 2023-08-15 08:38:07.915748909 +0000 UTC m=+620252.464764881: ☑️ agreed by windtalker.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 15, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 15, 2023
@ti-chi-bot ti-chi-bot bot merged commit 3144a46 into pingcap:release-6.5 Aug 15, 2023
@gengliqi
Copy link
Contributor Author

/cherrypick release-6.5-20230425-v6.5.2

@ti-chi-bot
Copy link
Member

@gengliqi: new pull request created to branch release-6.5-20230425-v6.5.2: #46110.

In response to this:

/cherrypick release-6.5-20230425-v6.5.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants