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

feat: memtable filter push down #2539

Merged
merged 8 commits into from
Oct 10, 2023

Conversation

v0y4g3r
Copy link
Contributor

@v0y4g3r v0y4g3r commented Oct 8, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR enables filter pushdown for memtable so that irrelavant time series can be skipped.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@v0y4g3r v0y4g3r marked this pull request as ready for review October 8, 2023 11:17
@killme2008
Copy link
Contributor

I think we should add some benchmark for this feature.

@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

Merging #2539 (fb0e9fe) into develop (19f300f) will decrease coverage by 0.38%.
Report is 1 commits behind head on develop.
The diff coverage is 90.39%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2539      +/-   ##
===========================================
- Coverage    85.38%   85.01%   -0.38%     
===========================================
  Files          737      737              
  Lines       117761   117916     +155     
===========================================
- Hits        100553   100241     -312     
- Misses       17208    17675     +467     

@waynexia
Copy link
Member

waynexia commented Oct 8, 2023

I think we should add some benchmark for this feature.

I've run an informal test against this branch, it can improve by around 70% performance in scanning memtable.

@killme2008
Copy link
Contributor

I think we should add some benchmark for this feature.

I've run an informal test against this branch, it can improve by around 70% performance in scanning memtable.

Cool. It would be beneficial for future improvements if we include a benchmark program in the repository.

@v0y4g3r v0y4g3r requested review from evenyag and waynexia and removed request for evenyag October 9, 2023 03:09
Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

LGTM

src/mito2/src/memtable/time_series.rs Outdated Show resolved Hide resolved
src/mito2/src/memtable/time_series.rs Outdated Show resolved Hide resolved
src/mito2/src/memtable/time_series.rs Show resolved Hide resolved
src/table/src/predicate.rs Outdated Show resolved Hide resolved
@v0y4g3r v0y4g3r force-pushed the feat/memtable-filter branch from 441bbc7 to fe18dfb Compare October 9, 2023 12:18
@v0y4g3r v0y4g3r requested a review from evenyag October 9, 2023 12:18
@evenyag evenyag added this pull request to the merge queue Oct 10, 2023
Merged via the queue into GreptimeTeam:develop with commit 8bdef9a Oct 10, 2023
13 checks passed
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: memtable support filter pushdown to prune primary keys

* fix: switch to next time series when pk not selected

* fix: allow predicate evaluation failure

* fix: some clippy warnings

* fix: panic when no primary key in schema

* feat: cache decoded record batch for primary key

* refactor: use arcswap instead of rwlock

* fix: format toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants