ianmcook commented on a change in pull request #10327:
URL: https://github.com/apache/arrow/pull/10327#discussion_r641733353
##########
File path: r/R/type.R
##########
@@ -423,6 +423,24 @@ as_type <- function(type, name = "type") {
type
}
+canonical_type_str <- function(type_str) {
Review comment:
This turned out too be more complicated than anticipated, for two
reasons:
- `canonical_type_str()` canonicalizes data type strings to match the output
of `DataType$ToString()`, but if we wanted to accept data type strings in
`as_type()`, we would instead need to convert them to the names of the R data
type functions. This is basically like the opposite of what
`canonical_type_str()` does so would require adding another function.
- For data types that take arguments, recognizing string representations of
them and converting them to R data type function calls would be quite difficult.
For these reasons, I think we should save this `as_type()` improvement for
another time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]