etiennebacher / tidypolars

Get the power of polars with the syntax of the tidyverse
https://tidypolars.etiennebacher.com
Other
141 stars 3 forks source link

Improve error message when failure in translated function #121

Closed etiennebacher closed 3 weeks ago

etiennebacher commented 3 weeks ago

min_rank_dplyr() should be min_rank()

library(dplyr, warn.conflicts = FALSE)
library(tidypolars)

mtcars |> 
  as_polars_df() |> 
  mutate(foo = min_rank())
#> Error in `mutate()`:
#> ! Error while running function `min_rank_dplyr()` in Polars.
#> ✖ Argument "x" is missing, with no default
etiennebacher commented 3 weeks ago
library(tidypolars)
library(dplyr, warn.conflicts = FALSE)

mtcars |> 
  as_polars_df() |> 
  mutate(foo = dplyr::min_rank())
#> Error in `mutate()`:
#> ! Error while running function `dplyr::min_rank()` in Polars.
#> ✖ Argument "x" is missing, with no default

mtcars |> 
  as_polars_df() |> 
  mutate(foo = min_rank())
#> Error in `mutate()`:
#> ! Error while running function `min_rank()` in Polars.
#> ✖ Argument "x" is missing, with no default