You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2022/08/16 18:54:00 UTC

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

Neal Richardson created ARROW-17438:
---------------------------------------

             Summary: [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
             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)