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

Read All Rows From Selected Columns #142

Open
Neofield-Dylan opened this issue Sep 5, 2024 · 2 comments
Open

Read All Rows From Selected Columns #142

Neofield-Dylan opened this issue Sep 5, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Neofield-Dylan
Copy link

Is there a way to read all rows from selected columns when creating cursor ?

I noticed that cursor has rowGroup which has all the data that I need to fetch, but I am not sure if always it will have all rows fetched or it's just because the data I loaded is small.
Because it will be much better to get all the rows in this way or than having to iterate with cursor.next

@wilwade wilwade added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Sep 5, 2024
@wilwade
Copy link
Member

wilwade commented Sep 5, 2024

Is there a way to read all rows from selected columns when creating cursor ?

As far as I am aware there is not, but it would be a nice improvement, and potentially help with speed as well.

@Neofield-Dylan
Copy link
Author

Is there a way to read all rows from selected columns when creating cursor ?

As far as I am aware there is not, but it would be a nice improvement, and potentially help with speed as well.

That's exactly why I want it.
Also, it's really bad design having to iterate with while loop checking if next() return null value to break the loop.
I ended changing to write .feather files and reading with apache-arrow.
With these changes, I just have two lines: one to create table passing the buffer and another to call .toArray function
And it's 2x faster than before. Clean code. Faster code. Just Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants