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

[r] [Feature request] Implementas generics for SOMASparseNDArrayReader #1453

Open
pablo-gar opened this issue Jun 6, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request post-1.0r r-api

Comments

@pablo-gar
Copy link
Member

Is your feature request related to a problem? Please describe.
Low-level API SOMASparseNDArrayRead adds complexity to the general R user.

see discussion here #1274 (comment)

Describe the solution you'd like

The current SOMASparseNDArrayRead supports iterators for arrow Table and Matrix dgTMatrix, to get a full concatenated result users need to perform $read()$tables()$concat() and $read()$sparse_matrix()$concat().

The following convenient wrappers should be provided for a more R-like experience

as(x, "CsparseMatrix")
as(x, "TsparseMatrix")
as(x, "RsparseMatrix")
as_arrow_table(x)

where x is a SOMASparseNDArrayRead. This can allow for a functionality like this:

as_arrow_table(SOMASparseNDArray$read())

# equivalent to
SOMASparseNDArray$read()$tables()$concat()

cc @mojaveazure

@pablo-gar pablo-gar added enhancement New feature or request r-api labels Jun 6, 2023
@pablo-gar pablo-gar self-assigned this Jun 6, 2023
@atolopko-czi atolopko-czi changed the title [Feature request] Implementas generics for SOMASparseNDArrayReader [r] [Feature request] Implementas generics for SOMASparseNDArrayReader Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request post-1.0r r-api
Projects
None yet
Development

No branches or pull requests

2 participants