[英]Sparklyr R with apache arrow fails, terminated unexpectedly: object 'as_tibble' not found
I am trying to use sparklyr with arrow to increase performance as seen for example here , however running into errors. 我正在尝试使用带有箭头的 sparklyr来提高性能,例如此处所示 ,但是遇到错误。
Here is a (hopefully) reproducible example: 这是(希望)可复制的示例:
# Prepare session and data
library(sparklyr)
library(dplyr)
config <- sparklyr::spark_config()
sc <- sparklyr::spark_connect(master = "local", config = config)
mtcars_sp <- dplyr::copy_to(sc, datasets::mtcars, overwrite = TRUE)
Using sparklyr without arrow works fine: 使用不带箭头的sparklyr可以正常工作:
if ("arrow" %in% .packages()) detach("package:arrow")
mtcars_sp %>% sparklyr::spark_apply(function(df) df) %>% collect()
However, adding arrow to the mix and running the same produces errors: 但是,将箭头添加到混合中并运行它会产生错误:
library(arrow)
mtcars_sp %>% sparklyr::spark_apply(function(df) df) %>% collect()
The error message does not seem too helpful, but looking at the worker log I see: 错误消息似乎并没有太大帮助,但查看工作日志,我看到:
ERROR sparklyr: RScript (6891) terminated unexpectedly: object 'as_tibble' not found 错误sparklyr:RScript(6891)意外终止:找不到对象'as_tibble'
Relevant sessioninfo: 相关会话信息:
There's a newer version of sparklyr
available, 1.0.2. 有可用的更新版本的sparklyr
1.0.2。 It looks like there are some changes in that release that are needed to work with arrow
0.14.x. 看起来该版本中有一些更改需要使用arrow
0.14.x。 sparklyr
's continuous integration with the latest version of arrow
is passing. sparklyr
与最新版本的arrow
的持续集成正在过去。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.