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

planner: support pushing down predicates to memory tables in prepared mode (#40262) | tidb-test=pr/2145 #44718

Conversation

djshow832
Copy link
Contributor

@djshow832 djshow832 commented Jun 16, 2023

What problem does this PR solve?

Issue Number: close #39605, cherry-pick from #40262

Problem Summary:
Predicates are not pushed down to memory tables in the prepared mode because the author avoids doing that intentionally. I'm not sure why but it should work.

What is changed and how it works?

Get the value from constant when it uses prepared mode. Note that it still skips evaluating when DeferredExpr is not nil.

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.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 16, 2023
@djshow832 djshow832 requested a review from xhebox June 16, 2023 02:55
Copy link
Member

@bb7133 bb7133 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 needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 16, 2023
@djshow832
Copy link
Contributor Author

/test mysql-test

@djshow832
Copy link
Contributor Author

/test unit-test

@djshow832
Copy link
Contributor Author

/test mysql-test

@djshow832 djshow832 changed the title planner: support pushing down predicates to memory tables in prepared mode (#40262) planner: support pushing down predicates to memory tables in prepared mode (#40262) | tidb-test=release-6.5.2 Jun 16, 2023
@djshow832
Copy link
Contributor Author

/test mysql-test

@djshow832 djshow832 changed the title planner: support pushing down predicates to memory tables in prepared mode (#40262) | tidb-test=release-6.5.2 planner: support pushing down predicates to memory tables in prepared mode (#40262) | tidb-test=pr/2145 Jun 16, 2023
@djshow832
Copy link
Contributor Author

/test mysql-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, xhebox

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 Jun 16, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 16, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-16 02:58:40.34651691 +0000 UTC m=+313716.761120982: ☑️ agreed by bb7133.
  • 2023-06-16 07:26:22.127007652 +0000 UTC m=+329778.541611728: ☑️ agreed by xhebox.

@ti-chi-bot ti-chi-bot bot merged commit fd021d3 into pingcap:release-6.5-20230425-v6.5.2 Jun 16, 2023
@djshow832 djshow832 deleted the release-6.5-20230425-v6.5.2 branch June 16, 2023 07:30
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/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.

3 participants