You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Will Jones (Jira)" <ji...@apache.org> on 2022/10/06 17:07:00 UTC

[jira] [Commented] (ARROW-17438) [R] glimpse() errors if there is a UDF

    [ https://issues.apache.org/jira/browse/ARROW-17438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613721#comment-17613721 ] 

Will Jones commented on ARROW-17438:
------------------------------------

I just tested, and this is now fixed. (I believe in ARROW-17178.) cc [~paleolimbot] 

> [R] glimpse() errors if there is a UDF
> --------------------------------------
>
>                 Key: ARROW-17438
>                 URL: https://issues.apache.org/jira/browse/ARROW-17438
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 9.0.0
>            Reporter: Neal Richardson
>            Priority: Major
>             Fix For: 10.0.0
>
>
> Using the example from ARROW-17437:
> {code}
> register_scalar_function(
>   "test", 
>   function(context, x) paste(x, collapse=","), 
>   utf8(), 
>   utf8(), 
>   auto_convert=TRUE
> )
> Table$create(x = c("a", "b", "c")) |>
>   transmute(test(x)) |>
>   glimpse()
> # Table (query)
> # 3 rows x 1 columns
> # Error in `dplyr::collect()`:
> # ! NotImplemented: Call to R (resolve scalar user-defined function output data type) from a non-R thread from an unsupported context
> # Run `rlang::last_error()` to see where the error occurred.
> {code}
> A variety of things could fix this:
> * Supporting UDFs in any query (I think there's a draft PR open for this)
> * The limit operator (FetchNode?) so that {{head()}} is handled in the ExecPlan and we don't need to use the RecordBatchReader workaround to get it efficiently (also PR in the works)
> * Worse case, error more informatively  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)