Skip to content

[R] Argument names ignored in schema supplied as in_type argument to register_scalar_function() #37761

Description

@csgillespie

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions