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] Add Arrow to R type mapper #3161

Merged

Conversation

mojaveazure
Copy link
Member

Add new r_type_from_arrow_type() function to get R types from Arrow types. This function takes an Arrow schema, field, or datatype and returns the corresponding R type (as indicated by typeof()) (or types for a schema)

I chose this route over modifiying the schema directly as modifying the schema turned out to be way harder than I anticipated (thanks to Arrow calling out to C/C++ for nearly all access)

SC-57387

Copy link
Member

@johnkerl johnkerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@@ -132,8 +132,7 @@ TileDBArray <- R6::R6Class(
#' @description Retrieve the array schema as an Arrow schema (lifecycle: maturing)
#' @return A [`arrow::schema`] object
schema = function() {
arrow::as_schema(
c_schema(self$uri, private$.soma_context));
return(arrow::as_schema(c_schema(self$uri, private$.soma_context)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Add new `r_type_from_arrow_type()` function to get R types from Arrow
types. This function takes an Arrow schema, field, or datatype and
returns the corresponding R type (as indicated by `typeof()`) (or types
for a schema)

[SC-57387](https://app.shortcut.com/tiledb-inc/story/57387)
[ci skip]
Bump develop version

[ci skip]
@mojaveazure mojaveazure force-pushed the paulhoffman/sc-57387/allow-accessing-an-r-ified-schema branch from 7b7c3f0 to 38da5ac Compare October 10, 2024 16:54
@mojaveazure mojaveazure merged commit 4d37aa9 into main Oct 10, 2024
@mojaveazure mojaveazure deleted the paulhoffman/sc-57387/allow-accessing-an-r-ified-schema branch October 10, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants