[R] Argument names ignored in schema supplied as `in_type` argument to `register_scalar_function()`
Open
Component: R
Priority: Medium
Type: bug
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
For `in_type`, I would have expected the argument name should match the data. But this doesn't seem to be the case
```
library(arrow)
library(dplyr)
# Make data set
write.csv(sleep, "sleep.csv", row.names = F)
# Register function
register_scalar_function(
name = "f",
fun = function(context, x) as.integer(x),
in_type = schema(blah = int64()), # NOTE: Schema name
out_type = int32(),
auto_convert = TRUE
)
open_dataset("sleep.csv", format = "csv") |>
mutate(f(group)) |>
head() |>
collect()
```
### Component(s)
R
Contributor guide
Assessment
This issue has not been assessed yet.