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

Fixed design error in filtered pages #114

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Fixed design error in filtered pages #114

merged 1 commit into from
Apr 4, 2022

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Apr 2, 2022

This PR fixes a design mistake in how filtered pages should be represented.

The examples in #102 assumed that a page would only overlap with a single row interval. However, it is possible for multiple row intervals to overlap a single page. The current API in main does not cater for this.

This PR fixes this, therefore closing #102.

Tests demonstrate how a column with pages containing

let page1 = vec![Some(0), Some(1), None, Some(3), Some(4), Some(5), Some(6)];
let page2 = vec![Some(10), Some(11)];

and the selection let intervals = &[Interval::new(2, 2)]; (start, length) yields vec![None, Some(3)])].

In this model, we do not decompress nor deserialize page2, and we do not deserialize the remaining items from page1.

Closes #102

@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2022

Codecov Report

Merging #114 (711af30) into main (eea5bfd) will increase coverage by 1.21%.
The diff coverage is 76.41%.

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   73.29%   74.51%   +1.21%     
==========================================
  Files          77       77              
  Lines        3367     3410      +43     
==========================================
+ Hits         2468     2541      +73     
+ Misses        899      869      -30     
Impacted Files Coverage Δ
src/deserialize/hybrid_rle.rs 67.64% <40.00%> (-16.08%) ⬇️
src/page/mod.rs 82.17% <72.22%> (+0.15%) ⬆️
src/read/page/indexed_reader.rs 53.94% <72.72%> (+53.94%) ⬆️
src/deserialize/utils.rs 90.62% <88.88%> (-2.71%) ⬇️
src/indexes/intervals.rs 97.72% <100.00%> (+7.16%) ⬆️
src/read/compression.rs 96.10% <100.00%> (ø)
src/read/page/reader.rs 93.33% <100.00%> (ø)
src/write/compression.rs 67.92% <100.00%> (ø)
src/write/page.rs 75.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eea5bfd...711af30. Read the comment docs.

@jorgecarleitao jorgecarleitao marked this pull request as ready for review April 3, 2022 20:02
@jorgecarleitao jorgecarleitao force-pushed the filtered branch 2 times, most recently from 87ad147 to 5de7753 Compare April 3, 2022 20:16
@jorgecarleitao jorgecarleitao merged commit f8eb243 into main Apr 4, 2022
@jorgecarleitao jorgecarleitao deleted the filtered branch April 4, 2022 06:21
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.

Added support for page-level filter pushdown (indexes)
2 participants