-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: extract a LogicalMemTable from DataSource to decouple memory/stored tables #13741
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 tasks
…ables Signed-off-by: Lonng <heng@lonng.org>
Codecov Report
@@ Coverage Diff @@
## master #13741 +/- ##
===========================================
Coverage 80.2815% 80.2815%
===========================================
Files 474 474
Lines 117631 117631
===========================================
Hits 94436 94436
Misses 15840 15840
Partials 7355 7355 |
winoros
reviewed
Nov 26, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
crazycs520
reviewed
Nov 26, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
/run-all-tests |
crazycs520
approved these changes
Nov 27, 2019
qw4990
pushed a commit
to qw4990/tidb
that referenced
this pull request
Nov 27, 2019
…ables (pingcap#13741) Signed-off-by: Lonng <heng@lonng.org>
XiaTianliang
pushed a commit
to XiaTianliang/tidb
that referenced
this pull request
Dec 21, 2019
…ables (pingcap#13741) Signed-off-by: Lonng <heng@lonng.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Lonng heng@lonng.org
What problem does this PR solve?
In the current implementation, all tables will be represented as a
DataSource
in the logical plan build stage. But tables can be classified into the virtual table (memory table
which data are stored in memory) and the stored table (data are stored in TiKV). And in our #13567 feature need to push some predictions down to the virtual table to make data retrieval more efficiency.e.g:
In the current implementation, we must retrieve all logs from cluster components and filter them in TiDB by predications
type='tikv' AND address='192.16.5.32'
, which is inefficiency. And the more efficient way is that pushtype='tikv' AND address='192.16.5.32'
to the lowest virtual tabletidb_cluster_log
and make theLogReaderExec
have some information about predications.This PR split
DataSource
intoDataSource
andLogicalMemTable
and make theLogicalMemTable
independent to make the subsequent work easily and don't use any tricky/hack ways to achieve our goal.What is changed and how it works?
This PR extracts a
LogicalMemTable
fromDataSource
to decouple memory/stored tables and make some predications push-down to memory table more easily.Check List
Tests
Release note