[ 
https://issues.apache.org/jira/browse/ARROW-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicola Crane updated ARROW-14469:
---------------------------------
    Description: 
It'll be worth checking the other lubridate temporal extraction bindings to 
check if any others need extra arguments implementing too


{code:r}
library(lubridate)

dates_table <- data.frame(
  date = as.Date(c("1987-10-09",  "2021-10-26"))
)

dates_table_arrow <- Table$create(dates_table)

dates_table_arrow %>%
  mutate(
    month = month(date, label = TRUE)

  ) %>%
  collect()

# Error: Invalid: Function month accepts 1 arguments but attempted to look up 
kernel(s) with 2 

{code}



  was:
It'll be worth checking the other lubridate temporal extraction bindings to 
check if any others need extra arguments implementing too


{code:r}
library(lubridate)

dates_table <- data.frame(
  date = as.Date(c("1987-10-09",  "2021-10-26"))
)

dates_table_arrow <- Table$create(dates_table)

dates_table_arrow %>%
  mutate(
    week_day = wday(date, label = TRUE),
    day = day(date),
    month = month(date, label = TRUE),
    year = year(date)  
  ) %>%
  collect()

{code}

# Error: Invalid: Function month accepts 1 arguments but attempted to look up 
kernel(s) with 2 


> [R] Binding for lubridate::month() doesn't have `label` argument implemented
> ----------------------------------------------------------------------------
>
>                 Key: ARROW-14469
>                 URL: https://issues.apache.org/jira/browse/ARROW-14469
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>            Reporter: Nicola Crane
>            Priority: Major
>
> It'll be worth checking the other lubridate temporal extraction bindings to 
> check if any others need extra arguments implementing too
> {code:r}
> library(lubridate)
> dates_table <- data.frame(
>   date = as.Date(c("1987-10-09",  "2021-10-26"))
> )
> dates_table_arrow <- Table$create(dates_table)
> dates_table_arrow %>%
>   mutate(
>     month = month(date, label = TRUE)
>   ) %>%
>   collect()
> # Error: Invalid: Function month accepts 1 arguments but attempted to look up 
> kernel(s) with 2 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to