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

What is the benefit of iterating over the stripes? #63

Open
JensRantil opened this issue Oct 27, 2020 · 2 comments
Open

What is the benefit of iterating over the stripes? #63

JensRantil opened this issue Oct 27, 2020 · 2 comments

Comments

@JensRantil
Copy link

JensRantil commented Oct 27, 2020

I'm looking at the example in the README, and the loop looks like this:

...

// Iterate over each stripe in the file.
for c.Stripes() {
    
    // Iterate over each row in the stripe.
    for c.Next() {
          
        // Retrieve a slice of interface values for the current row.
        log.Println(c.Row())
        
    }
   
}

...

What is the reason for the user having to iterate over the stripes? It feels very low-level. An alternative would be to simplify the API to

...

// Iterate over each row in the stripe.
for c.Next() {

    // Retrieve a slice of interface values for the current row.
    log.Println(c.Row())
   
}

...

...and have the cursor handle the stripes internally. Thoughts?

@scritchley
Copy link
Owner

That could be a nice simplification, my original thinking was to facilitate skipping a stripes based on checking column statistics. But that could be achieved in other ways.

@Zhile
Copy link

Zhile commented Oct 14, 2021

Another point I think is if we have this we can read stripes in parallel which make it more quickly.

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

No branches or pull requests

3 participants