Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the arrow package for R with lz4 support?

Tags:

r

apache-arrow

The R package arrow installed with install.packages('arrow') does not have lz4 support:

codec_is_available('lz4')
# [1] FALSE

The package version is:

packageVersion('arrow')
# [1] ‘0.17.1’

This is on Ubuntu 20.04.

How can I get an R arrow package with lz4 support?

like image 769
James Hirschorn Avatar asked Oct 16 '22 01:10

James Hirschorn


1 Answers

According to the docs, you can use export LIBARROW_MINIMAL=false when building from source to make a build which supports compression:

You can also install the R package from a git checkout:

git clone https://github.com/apache/arrow
cd arrow/r
R CMD INSTALL .

If you don't already have the Arrow C++ libraries on your system, when installing the R package from source, it will also download and build the Arrow C++ libraries for you. To speed installation up, you can set

export LIBARROW_BINARY=true

to look for C++ binaries prebuilt for your Linux distribution/version. Alternatively, you can set

export LIBARROW_MINIMAL=false

to build the Arrow libraries with optional features such as compression libraries enabled. This will increase the build time but provides many useful features. Prebuilt binaries are built with this flag enabled, so you get the full functionality by using them as well.

like image 57
Nick ODell Avatar answered Nov 04 '22 06:11

Nick ODell