You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/10/30 09:48:22 UTC

[arrow] branch master updated: ARROW-3647: [R] Fix R bit64 crash and formatting

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 85fd54c  ARROW-3647: [R] Fix R bit64 crash and formatting
85fd54c is described below

commit 85fd54c1f19896bec4e99fa6dd70b41b0d4dc957
Author: Javier Luraschi <ja...@hotmail.com>
AuthorDate: Tue Oct 30 05:48:13 2018 -0400

    ARROW-3647: [R] Fix R bit64 crash and formatting
    
    Fix for https://issues.apache.org/jira/browse/ARROW-3647 by adding a dependency to `bit64` in `arrow` which will avoid letting `bit64` be unloaded while `arrow` is loaded.
    
    Additionally, fix for https://github.com/rstudio/sparklyr/issues/1736, which was preventing tibbles using `integer64` to be formatted properly if `bit64` was not loaded explicitly.
    
    CC: @romainfrancois
    
    Author: Javier Luraschi <ja...@hotmail.com>
    
    Closes #2867 from javierluraschi/bugfix/r-bit64-crash and squashes the following commits:
    
    f84f1e160 <Javier Luraschi> ARROW-3647:  Fix R bit64 crash and formatting
---
 r/DESCRIPTION         |  1 +
 r/NAMESPACE           |  4 ++++
 r/R/reexports-bit64.R | 24 ++++++++++++++++++++++++
 r/man/reexports.Rd    |  6 +++++-
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/r/DESCRIPTION b/r/DESCRIPTION
index 1ab47cc..8284f01 100644
--- a/r/DESCRIPTION
+++ b/r/DESCRIPTION
@@ -57,5 +57,6 @@ Collate:
     'io.R'
     'memory_pool.R'
     'on_exit.R'
+    'reexports-bit64.R'
     'reexports-tibble.R'
     'zzz.R'
diff --git a/r/NAMESPACE b/r/NAMESPACE
index b9967a3..0f301b9 100644
--- a/r/NAMESPACE
+++ b/r/NAMESPACE
@@ -81,6 +81,7 @@ export(mmap_create)
 export(mmap_open)
 export(mock_output_stream)
 export(null)
+export(print.integer64)
 export(read_arrow)
 export(read_record_batch)
 export(read_table)
@@ -90,6 +91,7 @@ export(record_batch_file_writer)
 export(record_batch_stream_reader)
 export(record_batch_stream_writer)
 export(schema)
+export(str.integer64)
 export(struct)
 export(table)
 export(time32)
@@ -106,6 +108,8 @@ export(write_table)
 importFrom(R6,R6Class)
 importFrom(Rcpp,sourceCpp)
 importFrom(assertthat,assert_that)
+importFrom(bit64,print.integer64)
+importFrom(bit64,str.integer64)
 importFrom(glue,glue)
 importFrom(purrr,map)
 importFrom(purrr,map2)
diff --git a/r/R/reexports-bit64.R b/r/R/reexports-bit64.R
new file mode 100644
index 0000000..90a6e45
--- /dev/null
+++ b/r/R/reexports-bit64.R
@@ -0,0 +1,24 @@
+# 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.
+
+#' @importFrom bit64 print.integer64
+#' @export
+bit64::print.integer64
+
+#' @importFrom bit64 str.integer64
+#' @export
+bit64::str.integer64
diff --git a/r/man/reexports.Rd b/r/man/reexports.Rd
index 5171b3e..66194fe 100644
--- a/r/man/reexports.Rd
+++ b/r/man/reexports.Rd
@@ -1,8 +1,10 @@
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/reexports-tibble.R
+% Please edit documentation in R/reexports-bit64.R, R/reexports-tibble.R
 \docType{import}
 \name{reexports}
 \alias{reexports}
+\alias{print.integer64}
+\alias{str.integer64}
 \alias{as_tibble}
 \title{Objects exported from other packages}
 \keyword{internal}
@@ -11,6 +13,8 @@ These objects are imported from other packages. Follow the links
 below to see their documentation.
 
 \describe{
+  \item{bit64}{\code{\link[bit64]{print.integer64}}, \code{\link[bit64]{str.integer64}}}
+
   \item{tibble}{\code{\link[tibble]{as_tibble}}}
 }}