From 75ba5c9ae7c93b100912552527840173de85eb41 Mon Sep 17 00:00:00 2001 From: Jeffrey Wong Date: Fri, 4 Jan 2019 13:26:36 -0800 Subject: [PATCH 1/3] add contributor --- r/DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index bfd4d1e892eb2..e72f992947327 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -4,6 +4,7 @@ Version: 0.0.0.9000 Authors@R: c( person("Romain", "François", email = "romain@rstudio.com", role = c("aut", "cre")), person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("ctb")), + person("Jeffrey", "Wong", email = "jeffreyw@netflix.com", role = c("ctb")), person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph")) ) Description: R Integration to 'Apache' 'Arrow'. From 8ccaa517277de9be8e0b21388d21ddd3611e53b2 Mon Sep 17 00:00:00 2001 From: Jeffrey Wong Date: Fri, 4 Jan 2019 13:26:54 -0800 Subject: [PATCH 2/3] cleanup --- r/R/read_parquet.R | 10 ---------- r/src/parquetfilereader.cpp | 38 ------------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 r/R/read_parquet.R delete mode 100644 r/src/parquetfilereader.cpp diff --git a/r/R/read_parquet.R b/r/R/read_parquet.R deleted file mode 100644 index b6f6fb59f16e0..0000000000000 --- a/r/R/read_parquet.R +++ /dev/null @@ -1,10 +0,0 @@ -#' Read parquet file from disk -#' -#' @param files a vector of filenames -#' @export -read_parquet = function(files) { - tables = lapply(files, function(f) { - return (as_tibble(shared_ptr(`arrow::Table`, read_parquet_file(f)))) - }) - do.call('rbind', tables) -} diff --git a/r/src/parquetfilereader.cpp b/r/src/parquetfilereader.cpp deleted file mode 100644 index 05b1252eb6358..0000000000000 --- a/r/src/parquetfilereader.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// // Licensed to the Apache Software Foundation (ASF) under one -// // or more contributor license agreements. See the NOTICE file -// // distributed with this work for additional information -// // regarding copyright ownership. The ASF licenses this file -// // to you under the Apache License, Version 2.0 (the -// // "License"); you may not use this file except in compliance -// // with the License. You may obtain a copy of the License at -// // -// // http://www.apache.org/licenses/LICENSE-2.0 -// // -// // Unless required by applicable law or agreed to in writing, -// // software distributed under the License is distributed on an -// // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// // KIND, either express or implied. See the License for the -// // specific language governing permissions and limitations -// // under the License. -// -// -#include -#include -#include -#include -#include - -// [[Rcpp::export]] -std::shared_ptr read_parquet_file(std::string filename) { - std::shared_ptr infile; - PARQUET_THROW_NOT_OK(arrow::io::ReadableFile::Open( - filename, arrow::default_memory_pool(), &infile)); - - std::unique_ptr reader; - PARQUET_THROW_NOT_OK( - parquet::arrow::OpenFile(infile, arrow::default_memory_pool(), &reader)); - std::shared_ptr table; - PARQUET_THROW_NOT_OK(reader->ReadTable(&table)); - - return table; -} From 1df3026cbd1fa112df6ebd98478888c49ee9bfb5 Mon Sep 17 00:00:00 2001 From: Jeffrey Wong Date: Fri, 4 Jan 2019 13:54:06 -0800 Subject: [PATCH 3/3] don't hard code -larrow and -lparquet --- r/configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/r/configure b/r/configure index 0d9414215262a..c17fd4c2ef624 100755 --- a/r/configure +++ b/r/configure @@ -32,7 +32,7 @@ PKG_RPM_NAME="arrow" PKG_CSW_NAME="arrow" PKG_BREW_NAME="apache-arrow" PKG_TEST_HEADER="" -PKG_LIBS="-larrow" +PKG_LIBS="-larrow -lparquet" # Use pkg-config if available pkg-config --version >/dev/null 2>&1 @@ -49,8 +49,7 @@ if [ "$INCLUDE_DIR" ] || [ "$LIB_DIR" ]; then elif [ "$PKGCONFIG_CFLAGS" ] || [ "$PKGCONFIG_LIBS" ]; then echo "Found pkg-config cflags and libs!" PKG_CFLAGS=${PKGCONFIG_CFLAGS} - #PKG_LIBS=${PKGCONFIG_LIBS} - PKG_LIBS="-larrow -lparquet" # hard coded! what is the right way to do this? + PKG_LIBS=${PKGCONFIG_LIBS} elif [[ "$OSTYPE" == "darwin"* ]]; then if [ "$(command -v brew)" ]; then BREWDIR=$(brew --prefix)