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

Simplified API to get page iterator #36

Merged
merged 1 commit into from
Aug 25, 2021
Merged

Simplified API to get page iterator #36

merged 1 commit into from
Aug 25, 2021

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Aug 25, 2021

old:

pub fn get_page_iterator<'a, RR: Read + Seek>(metadata: &FileMetaData, row_group: usize, column: usize, ...)

new:

pub fn get_page_iterator<'a, RR: Read + Seek>(column_metadata: &ColumnChunkMetaData, ...)

it makes it a bit more explicit and users usually already get the column metadata, to get the file descriptor and stats (code duplication of consumers).

To migrate,

before:

let compressed_pages = get_page_iterator(&metadata, row_group, column, &mut file, file)?.collect()?;

after:

let column_meta = metadata.row_groups[row_group].column(column);
let compressed_pages = get_page_iterator(column_meta, &mut file, file)?.collect()?;

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2021

Codecov Report

Merging #36 (d968bde) into main (450c99d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   67.10%   67.13%   +0.02%     
==========================================
  Files          63       63              
  Lines        3481     3484       +3     
==========================================
+ Hits         2336     2339       +3     
  Misses       1145     1145              
Impacted Files Coverage Δ
src/read/mod.rs 90.80% <100.00%> (+0.16%) ⬆️

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 450c99d...d968bde. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit 7661cd4 into main Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants