[
https://issues.apache.org/jira/browse/ARROW-16030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17513360#comment-17513360
]
Dewey Dunnington commented on ARROW-16030:
------------------------------------------
Just some thoughts! It relates to ARROW-15168 in that it would be another S3
generic that produces an arrow object.
I think there are three things going on with a schema...construction
({{schema(...)}}, coercion ({{as_arrow_schema(...)}} maybe), and extraction
(???). Lots of libraries lump bits of that together...(e.g.,
{{sf::st_crs(...)}} does both all three!). Substrait will need extraction, too,
so it should definitely exist. Maybe {{extract_schema(x)}}? Should it also
infer the schema from a data.frame or database connection (like {{type(x)}}?).
> [R] Add a schema method for arrow_dplyr_query
> ---------------------------------------------
>
> Key: ARROW-16030
> URL: https://issues.apache.org/jira/browse/ARROW-16030
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Jonathan Keane
> Priority: Major
>
> we have {{implicit_schema()}} which can generate the final schema for a
> query, though it's not exported. Maybe we "just" export that for people to be
> able to get what the schema of the resulting query will be.
> Alternatively we could make a {{schema}} (S3) method that would return the
> (implicit) schema with {{schema(query_obj)}}. Though this might be
> overloading {{schema}} since that is not how we retrieve schemas elsewhere
> (e.g. {{schema(arrow_table(mtcars))}} does not currently work).
> One use case: https://github.com/duckdb/duckdb/pull/3299
--
This message was sent by Atlassian Jira
(v8.20.1#820001)