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: primary keys support sample #1243

Merged
merged 21 commits into from
Oct 19, 2023
Merged

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Oct 8, 2023

Rationale

Primary keys will affect how rows are placed, by sort rows by column with low cardinality, we can improve row group prune rate, which is beneficial for query perf.

Detailed Changes

  • In sampling memtable, do primary key sampling for APPEND-mode table.
  • When flush sampling memtable, sort by new primary keys.
  • This feature default to false now, controlled by enable_primary_key_sampling.

Test Plan

Integration tests.

@jiacai2050 jiacai2050 marked this pull request as ready for review October 9, 2023 09:54
@jiacai2050 jiacai2050 force-pushed the feat-suggest-pk branch 2 times, most recently from f113546 to e99367e Compare October 11, 2023 05:54
common_types/src/schema.rs Outdated Show resolved Hide resolved
common_types/src/schema.rs Show resolved Hide resolved
analytic_engine/src/sampler.rs Outdated Show resolved Hide resolved
analytic_engine/src/sampler.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 merged commit 1df984c into apache:main Oct 19, 2023
8 checks passed
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.

2 participants