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: prevent from pushing down filter of non primary key or ts key #611

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

Rachelint
Copy link
Contributor

Which issue does this PR close?

Closes #605

Rationale for this change

See #605

What changes are included in this PR?

Check if the column in push down filter is primary key or ts key, if not prevent to pass such filter to table scan.

Are there any user-facing changes?

None.

How does this change test

Test by ut.

@codecov-commenter
Copy link

Codecov Report

Merging #611 (d8d234b) into main (6d57582) will increase coverage by 3.38%.
The diff coverage is 55.26%.

@@            Coverage Diff             @@
##             main     #611      +/-   ##
==========================================
+ Coverage   62.61%   66.00%   +3.38%     
==========================================
  Files         326      285      -41     
  Lines       50232    44392    -5840     
==========================================
- Hits        31454    29301    -2153     
+ Misses      18778    15091    -3687     
Impacted Files Coverage Δ
table_engine/src/provider.rs 59.21% <55.26%> (-1.62%) ⬇️
server/src/grpc/storage_service/write.rs 38.99% <0.00%> (-3.67%) ⬇️
analytic_engine/src/sst/file.rs 76.17% <0.00%> (-1.09%) ⬇️
analytic_engine/src/instance/write_worker.rs 72.41% <0.00%> (-0.77%) ⬇️
analytic_engine/src/row_iter/merge.rs 88.58% <0.00%> (-0.19%) ⬇️
analytic_engine/src/meta/details.rs 97.62% <0.00%> (-0.17%) ⬇️
query_engine/src/context.rs 98.11% <0.00%> (-0.04%) ⬇️
server/src/http.rs 0.00% <0.00%> (ø)
server/src/server.rs 0.00% <0.00%> (ø)
sql/src/partition.rs 0.00% <0.00%> (ø)
... and 50 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Rachelint Rachelint marked this pull request as ready for review February 6, 2023 11:52
table_engine/src/provider.rs Outdated Show resolved Hide resolved
table_engine/src/provider.rs Outdated Show resolved Hide resolved
table_engine/src/provider.rs Outdated Show resolved Hide resolved
@ShiKaiWi ShiKaiWi changed the title feat: prevent to push down filter of non primary key or ts key feat: prevent from pushing down filter of non primary key or ts key Feb 7, 2023
common_types/src/schema.rs Show resolved Hide resolved
table_engine/src/provider.rs Outdated Show resolved Hide resolved
@Rachelint Rachelint force-pushed the prevent-to-pushdown-non-pk branch 3 times, most recently from 64a1582 to 3364b2c Compare February 7, 2023 08:24
Copy link
Contributor

@jiacai2050 jiacai2050 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 1b373e0 into apache:main Feb 7, 2023
MichaelLeeHZ pushed a commit to MichaelLeeHZ/ceresdb that referenced this pull request Feb 8, 2023
…pache#611)

* prevent to push down filter of non primary key or ts key.

* add test.

* address CR.
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
…pache#611)

* prevent to push down filter of non primary key or ts key.

* add test.

* address CR.
@Rachelint Rachelint deleted the prevent-to-pushdown-non-pk branch May 27, 2023 12:20
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.

Query stale data in overwritten mode when filter match the old one
4 participants