You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2020/04/20 19:21:42 UTC

[arrow] branch master updated (1b71ca7 -> 5093b80)

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

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


    omit 1b71ca7  ARROW-8477: [C++] Enable reading and writing of long filenames for Windows
    omit 456a6f6  ARROW-8488: [R] Remove VALUE_OR_STOP and STOP_IF_NOT_OK macros
    omit f045de2  ARROW-8523: [C++] Optimize BitmapReader
    omit b084180  ARROW-8526: [Python] Fix non-deterministic row order failure in dataset tests
    omit b20f709  ARROW-8524: [CI] Free up space on github actions
    omit 21ce3c5  ARROW-8515: [C++] Bitmap::ToString should group by bytes
    omit aa55967  ARROW-8520: [Developer] Use .asf.yaml to direct GitHub notifications to JIRA and mailing lists
    omit 6c99c53  ARROW-8517: [Release] Update Crossbow release verification tasks for 0.17.0 RC0
    omit debefc5  ARROW-8507: [Release] Detect .git directory automatically in changelog.py
    omit 7a2816d  ARROW-8511: [Release] In verify-release-candidate.bat, exit when CMake build fails, use Unity build
    omit 8648cd4  ARROW-8467: [C++] Fix TestArrayImport tests for big-endian platforms
    omit 8b21c7a  ARROW-8360: [C++][Gandiva] Fixes date32 support for date/time functions
    omit ca7418f  ARROW-8443: [Gandiva][C++] Fix Trunc and Round output types.
    omit d3a9a84  ARROW-8496: [C++] Refine ByteStreamSplitDecodeScalar
    omit c152ab6  ARROW-8506: [C++] Add tests to verify the encoded stream of RLE with bit_width > 8
    omit 3e1680e  ARROW-8503: [Packaging][deb] Fix building apache-arrow-archive-keyring for RC
    omit cdcc4dc  ARROW-8502: [Release][APT][Yum] Ignore all Linux packages for arm64v8
    omit c1efecc  ARROW-8448: [Packaging] Update linux-packages README
    omit 37bf6e3  ARROW-8501: [Packaging][RPM] Upgrade devtoolset to 8 on CentOS 6
    omit 858349b  ARROW-8499: [C++][Dataset] In ScannerBuilder, batch_size will not wor…
    omit 40cd5b8  PARQUET-1843: [C++] Drop duplicated assignment
    omit 49718c0  ARROW-8483: [Ruby] Removed irrelevant bits of documentation in Arrow::Table
    omit 2d97fc4  ARROW-7801: [Developer] Add issue_comment workflow to fix lint/style/codegen
    omit 9197ba8  ARROW-6439: [R] Implement S3 file-system interface in R
    omit b371742  ARROW-8474: [CI][Crossbow] Skip some nightlies we don't need to run
     add 7bbfd11  [Release] Update CHANGELOG.md for 0.17.0
     add 53d5907  [Release] Update .deb/.rpm changelogs for 0.17.0
     add 585c278  [Release] Update versions for 0.17.0
     add c169b90  [Release] Update JAVA versions for 0.17.0
     add 9d5401b  [Release] Ignore Java JNI OrcReaderTest
     add f2a59a4  [Release] Update .deb package names for 0.17.0
     add 3cbcb7b  [maven-release-plugin] prepare release apache-arrow-0.17.0
     new 00f3318  [maven-release-plugin] prepare for next development iteration
     new 532635b  [Release] Update versions for 0.18.0-SNAPSHOT
     new 80ae659  [Release] Update .deb package names for 0.18.0
     new a74d32c  ARROW-8474: [CI][Crossbow] Skip some nightlies we don't need to run
     new bb69967  ARROW-6439: [R] Implement S3 file-system interface in R
     new f42ba92  ARROW-7801: [Developer] Add issue_comment workflow to fix lint/style/codegen
     new 5165e0d  ARROW-8483: [Ruby] Removed irrelevant bits of documentation in Arrow::Table
     new c34fa08  PARQUET-1843: [C++] Drop duplicated assignment
     new 5ba9701  ARROW-8499: [C++][Dataset] In ScannerBuilder, batch_size will not wor…
     new 620bb28  ARROW-8501: [Packaging][RPM] Upgrade devtoolset to 8 on CentOS 6
     new a170ecd  ARROW-8448: [Packaging] Update linux-packages README
     new d3d99c5  ARROW-8502: [Release][APT][Yum] Ignore all Linux packages for arm64v8
     new d8de579  ARROW-8503: [Packaging][deb] Fix building apache-arrow-archive-keyring for RC
     new 636d820  ARROW-8506: [C++] Add tests to verify the encoded stream of RLE with bit_width > 8
     new b96cd36  ARROW-8496: [C++] Refine ByteStreamSplitDecodeScalar
     new 8b5b8e0  ARROW-8443: [Gandiva][C++] Fix Trunc and Round output types.
     new cc2b8cc  ARROW-8360: [C++][Gandiva] Fixes date32 support for date/time functions
     new 1e6cb8b  ARROW-8467: [C++] Fix TestArrayImport tests for big-endian platforms
     new 6f626af  ARROW-8511: [Release] In verify-release-candidate.bat, exit when CMake build fails, use Unity build
     new acc7d4c  ARROW-8507: [Release] Detect .git directory automatically in changelog.py
     new 84e3f19  ARROW-8517: [Release] Update Crossbow release verification tasks for 0.17.0 RC0
     new 046c1d9  ARROW-8520: [Developer] Use .asf.yaml to direct GitHub notifications to JIRA and mailing lists
     new b5aaed8  ARROW-8515: [C++] Bitmap::ToString should group by bytes
     new efd64ea  ARROW-8524: [CI] Free up space on github actions
     new 6468d37  ARROW-8526: [Python] Fix non-deterministic row order failure in dataset tests
     new 7a77282  ARROW-8523: [C++] Optimize BitmapReader
     new a6290a8  ARROW-8488: [R] Remove VALUE_OR_STOP and STOP_IF_NOT_OK macros
     new 5093b80  ARROW-8477: [C++] Enable reading and writing of long filenames for Windows

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1b71ca7)
            \
             N -- N -- N   refs/heads/master (5093b80)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.md                                       | 600 +++++++++++++++++++++
 c_glib/configure.ac                                |   2 +-
 c_glib/meson.build                                 |   2 +-
 ci/scripts/PKGBUILD                                |   2 +-
 cpp/CMakeLists.txt                                 |   2 +-
 csharp/Directory.Build.props                       |   2 +-
 dev/release/rat_exclude_files.txt                  |  52 +-
 dev/tasks/homebrew-formulae/apache-arrow.rb        |   2 +-
 .../homebrew-formulae/autobrew/apache-arrow.rb     |   2 +-
 .../apache-arrow-archive-keyring/debian/changelog  |   6 +
 .../yum/apache-arrow-release.spec.in               |   3 +
 .../apache-arrow/debian.ubuntu-xenial/changelog    |   6 +
 .../apache-arrow/debian.ubuntu-xenial/control      |  78 +--
 .../libarrow-cuda-glib18.install}                  |   0
 .../libarrow-cuda18.install}                       |   0
 .../libarrow-dataset18.install}                    |   0
 .../libarrow-glib18.install}                       |   0
 .../libarrow-python18.install}                     |   0
 .../libarrow18.install}                            |   0
 .../libgandiva-glib18.install}                     |   0
 .../libgandiva18.install}                          |   0
 .../libparquet-glib18.install}                     |   0
 .../libparquet18.install}                          |   0
 .../libplasma-glib18.install}                      |   0
 .../libplasma18.install}                           |   0
 .../linux-packages/apache-arrow/debian/changelog   |   6 +
 .../linux-packages/apache-arrow/debian/control     |  94 ++--
 .../libarrow-cuda-glib18.install}                  |   0
 .../libarrow-cuda18.install}                       |   0
 .../libarrow-dataset18.install}                    |   0
 ...flight100.install => libarrow-flight18.install} |   0
 .../libarrow-glib18.install}                       |   0
 ...00.install => libarrow-python-flight18.install} |   0
 .../libarrow-python18.install}                     |   0
 .../libarrow18.install}                            |   0
 .../libgandiva-glib18.install}                     |   0
 .../libgandiva18.install}                          |   0
 .../libparquet-glib18.install}                     |   0
 .../libparquet18.install}                          |   0
 .../libplasma-glib18.install}                      |   0
 .../libplasma18.install}                           |   0
 .../linux-packages/apache-arrow/yum/arrow.spec.in  |   3 +
 dev/tasks/tasks.yml                                | 404 +++++++-------
 java/adapter/avro/pom.xml                          |   2 +-
 java/adapter/jdbc/pom.xml                          |   2 +-
 java/adapter/orc/pom.xml                           |   2 +-
 .../apache/arrow/adapter/orc/OrcReaderTest.java    |   3 +-
 java/algorithm/pom.xml                             |   2 +-
 java/flight/flight-core/pom.xml                    |   2 +-
 java/flight/flight-grpc/pom.xml                    |   2 +-
 java/format/pom.xml                                |   2 +-
 java/gandiva/pom.xml                               |   2 +-
 java/memory/pom.xml                                |   2 +-
 java/performance/pom.xml                           |   4 +-
 java/plasma/pom.xml                                |   2 +-
 java/pom.xml                                       |   2 +-
 java/tools/pom.xml                                 |   2 +-
 java/vector/pom.xml                                |   2 +-
 js/package.json                                    |   2 +-
 matlab/CMakeLists.txt                              |   2 +-
 python/setup.py                                    |   2 +-
 r/DESCRIPTION                                      |   2 +-
 r/NEWS.md                                          |   4 +-
 ruby/red-arrow-cuda/lib/arrow-cuda/version.rb      |   2 +-
 ruby/red-arrow/lib/arrow/version.rb                |   2 +-
 ruby/red-gandiva/lib/gandiva/version.rb            |   2 +-
 ruby/red-parquet/lib/parquet/version.rb            |   2 +-
 ruby/red-plasma/lib/plasma/version.rb              |   2 +-
 rust/arrow-flight/Cargo.toml                       |   2 +-
 rust/arrow/Cargo.toml                              |   2 +-
 rust/datafusion/Cargo.toml                         |   8 +-
 rust/datafusion/README.md                          |   2 +-
 rust/parquet/Cargo.toml                            |   4 +-
 rust/parquet/README.md                             |   4 +-
 74 files changed, 985 insertions(+), 358 deletions(-)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow-cuda-glib100.install => debian.ubuntu-xenial/libarrow-cuda-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow-cuda100.install => debian.ubuntu-xenial/libarrow-cuda18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow-dataset100.install => debian.ubuntu-xenial/libarrow-dataset18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow-glib100.install => debian.ubuntu-xenial/libarrow-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow-python100.install => debian.ubuntu-xenial/libarrow-python18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libarrow100.install => debian.ubuntu-xenial/libarrow18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libgandiva-glib100.install => debian.ubuntu-xenial/libgandiva-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libgandiva100.install => debian.ubuntu-xenial/libgandiva18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libparquet-glib100.install => debian.ubuntu-xenial/libparquet-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libparquet100.install => debian.ubuntu-xenial/libparquet18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libplasma-glib100.install => debian.ubuntu-xenial/libplasma-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian/libplasma100.install => debian.ubuntu-xenial/libplasma18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow-cuda-glib100.install => debian/libarrow-cuda-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow-cuda100.install => debian/libarrow-cuda18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow-dataset100.install => debian/libarrow-dataset18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/debian/{libarrow-flight100.install => libarrow-flight18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow-glib100.install => debian/libarrow-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/debian/{libarrow-python-flight100.install => libarrow-python-flight18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow-python100.install => debian/libarrow-python18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libarrow100.install => debian/libarrow18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libgandiva-glib100.install => debian/libgandiva-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libgandiva100.install => debian/libgandiva18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libparquet-glib100.install => debian/libparquet-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libparquet100.install => debian/libparquet18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libplasma-glib100.install => debian/libplasma-glib18.install} (100%)
 rename dev/tasks/linux-packages/apache-arrow/{debian.ubuntu-xenial/libplasma100.install => debian/libplasma18.install} (100%)


[arrow] 20/28: ARROW-8507: [Release] Detect .git directory automatically in changelog.py

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit acc7d4cbd550d270c29e0a34110729b5f05cdeca
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Mon Apr 20 05:42:15 2020 +0900

    ARROW-8507: [Release] Detect .git directory automatically in changelog.py
    
    Closes #6975 from kou/release-changelog-detect-arrow-root
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 dev/release/changelog.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev/release/changelog.py b/dev/release/changelog.py
index 052b85d..4e85e46 100755
--- a/dev/release/changelog.py
+++ b/dev/release/changelog.py
@@ -47,9 +47,9 @@ asf_jira = jira.client.JIRA(options={'server': JIRA_API_BASE},
 locale.setlocale(locale.LC_ALL, 'en_US.utf-8')
 
 
-if 'ARROW_ROOT' not in os.environ:
-    raise Exception("Please set $ARROW_ROOT to the location of your "
-                    "Arrow git clone")
+release_dir = os.path.realpath(os.path.dirname(__file__))
+ARROW_ROOT_DEFAULT = os.path.join(release_dir, '..', '..')
+ARROW_ROOT = os.environ.get("ARROW_ROOT", ARROW_ROOT_DEFAULT)
 
 
 def get_issues_for_version(version):
@@ -91,7 +91,7 @@ def get_jiras_from_git_changelog(current_version):
     last_major_version = get_last_major_version(current_version)
 
     # Path to .git directory
-    git_dir = os.path.join(os.environ['ARROW_ROOT'], '.git')
+    git_dir = os.path.join(ARROW_ROOT, '.git')
 
     cmd = ['git', '--git-dir', git_dir, 'log', '--pretty=format:%s',
            'apache-arrow-{}..apache-arrow-{}'.format(last_major_version,


[arrow] 02/28: [Release] Update versions for 0.18.0-SNAPSHOT

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 532635bd2aa811424d5bd0fc3a22cfc2f520255b
Author: Krisztián Szűcs <sz...@gmail.com>
AuthorDate: Thu Apr 16 15:43:34 2020 +0200

    [Release] Update versions for 0.18.0-SNAPSHOT
---
 c_glib/configure.ac                                  | 2 +-
 c_glib/meson.build                                   | 2 +-
 ci/scripts/PKGBUILD                                  | 2 +-
 cpp/CMakeLists.txt                                   | 2 +-
 csharp/Directory.Build.props                         | 2 +-
 dev/tasks/homebrew-formulae/apache-arrow.rb          | 2 +-
 dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb | 2 +-
 js/package.json                                      | 2 +-
 matlab/CMakeLists.txt                                | 2 +-
 python/setup.py                                      | 2 +-
 r/DESCRIPTION                                        | 2 +-
 r/NEWS.md                                            | 2 ++
 ruby/red-arrow-cuda/lib/arrow-cuda/version.rb        | 2 +-
 ruby/red-arrow/lib/arrow/version.rb                  | 2 +-
 ruby/red-gandiva/lib/gandiva/version.rb              | 2 +-
 ruby/red-parquet/lib/parquet/version.rb              | 2 +-
 ruby/red-plasma/lib/plasma/version.rb                | 2 +-
 rust/arrow-flight/Cargo.toml                         | 2 +-
 rust/arrow/Cargo.toml                                | 2 +-
 rust/datafusion/Cargo.toml                           | 8 ++++----
 rust/datafusion/README.md                            | 2 +-
 rust/parquet/Cargo.toml                              | 4 ++--
 rust/parquet/README.md                               | 4 ++--
 23 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/c_glib/configure.ac b/c_glib/configure.ac
index a69f607..b58a44a 100644
--- a/c_glib/configure.ac
+++ b/c_glib/configure.ac
@@ -17,7 +17,7 @@
 
 AC_PREREQ(2.65)
 
-m4_define([arrow_glib_version], 0.17.0)
+m4_define([arrow_glib_version], 0.18.0-SNAPSHOT)
 AC_INIT([arrow-glib],
         arrow_glib_version,
         [https://issues.apache.org/jira/browse/ARROW],
diff --git a/c_glib/meson.build b/c_glib/meson.build
index 4050d37..649769e 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -23,7 +23,7 @@ project('arrow-glib', 'c', 'cpp',
           'cpp_std=c++11',
         ])
 
-version = '0.17.0'
+version = '0.18.0-SNAPSHOT'
 if version.endswith('-SNAPSHOT')
   version_numbers = version.split('-')[0].split('.')
   version_tag = version.split('-')[1]
diff --git a/ci/scripts/PKGBUILD b/ci/scripts/PKGBUILD
index 5aa9049..c1266c9 100644
--- a/ci/scripts/PKGBUILD
+++ b/ci/scripts/PKGBUILD
@@ -18,7 +18,7 @@
 _realname=arrow
 pkgbase=mingw-w64-${_realname}
 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
-pkgver=0.17.0
+pkgver=0.17.0.9000
 pkgrel=8000
 pkgdesc="Apache Arrow is a cross-language development platform for in-memory data (mingw-w64)"
 arch=("any")
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 45a6f2e..b9aedaf 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -18,7 +18,7 @@
 cmake_minimum_required(VERSION 3.2)
 message(STATUS "Building using CMake version: ${CMAKE_VERSION}")
 
-set(ARROW_VERSION "0.17.0")
+set(ARROW_VERSION "0.18.0-SNAPSHOT")
 
 string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" ARROW_BASE_VERSION "${ARROW_VERSION}")
 
diff --git a/csharp/Directory.Build.props b/csharp/Directory.Build.props
index 1f656de..76232d2 100644
--- a/csharp/Directory.Build.props
+++ b/csharp/Directory.Build.props
@@ -12,7 +12,7 @@
     <Product>Apache Arrow library</Product>
     <Copyright>Copyright 2016-2019 The Apache Software Foundation</Copyright>
     <Company>The Apache Software Foundation</Company>
-    <Version>0.17.0</Version>
+    <Version>0.18.0-SNAPSHOT</Version>
   </PropertyGroup>
 
   <PropertyGroup>
diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb
index 0a536bd..10416a4 100644
--- a/dev/tasks/homebrew-formulae/apache-arrow.rb
+++ b/dev/tasks/homebrew-formulae/apache-arrow.rb
@@ -1,7 +1,7 @@
 class ApacheArrow < Formula
   desc "Columnar in-memory analytics layer designed to accelerate big data"
   homepage "https://arrow.apache.org/"
-  url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-0.17.0/apache-arrow-0.17.0.tar.gz"
+  url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-0.18.0-SNAPSHOT/apache-arrow-0.18.0-SNAPSHOT.tar.gz"
   sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
   head "https://github.com/apache/arrow.git"
 
diff --git a/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb b/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb
index 3d4d1df..521042b 100644
--- a/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb
+++ b/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb
@@ -19,7 +19,7 @@
 class ApacheArrow < Formula
   desc "Columnar in-memory analytics layer designed to accelerate big data"
   homepage "https://arrow.apache.org/"
-  url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-0.17.0/apache-arrow-0.17.0.tar.gz"
+  url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-0.17.0.9000/apache-arrow-0.17.0.9000.tar.gz"
   sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
   head "https://github.com/apache/arrow.git"
 
diff --git a/js/package.json b/js/package.json
index 6adbffe..cd5f7c6 100644
--- a/js/package.json
+++ b/js/package.json
@@ -113,5 +113,5 @@
   "engines": {
     "node": ">=11.12"
   },
-  "version": "0.17.0"
+  "version": "0.18.0-SNAPSHOT"
 }
diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt
index 2369b74..0202f1b 100755
--- a/matlab/CMakeLists.txt
+++ b/matlab/CMakeLists.txt
@@ -18,7 +18,7 @@
 cmake_minimum_required(VERSION 3.2)
 set(CMAKE_CXX_STANDARD 11)
 
-set(MLARROW_VERSION "0.17.0")
+set(MLARROW_VERSION "0.18.0-SNAPSHOT")
 string(REGEX MATCH
   "^[0-9]+\\.[0-9]+\\.[0-9]+" MLARROW_BASE_VERSION "${MLARROW_VERSION}")
 
diff --git a/python/setup.py b/python/setup.py
index b72697a..134d6a4 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -512,7 +512,7 @@ def _move_shared_libs_unix(build_prefix, build_lib, lib_name):
 
 # If the event of not running from a git clone (e.g. from a git archive
 # or a Python sdist), see if we can set the version number ourselves
-default_version = '0.17.0'
+default_version = '0.18.0-SNAPSHOT'
 if (not os.path.exists('../.git')
         and not os.environ.get('SETUPTOOLS_SCM_PRETEND_VERSION')):
     if os.path.exists('PKG-INFO'):
diff --git a/r/DESCRIPTION b/r/DESCRIPTION
index f566262..fb30234 100644
--- a/r/DESCRIPTION
+++ b/r/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: arrow
 Title: Integration to 'Apache' 'Arrow'
-Version: 0.17.0
+Version: 0.17.0.9000
 Authors@R: c(
     person("Romain", "Fran\u00e7ois", email = "romain@rstudio.com", role = c("aut"), comment = c(ORCID = "0000-0002-2444-4226")),
     person("Jeroen", "Ooms", email = "jeroen@berkeley.edu", role = c("aut")),
diff --git a/r/NEWS.md b/r/NEWS.md
index 7cf8ef9..7623cf8 100644
--- a/r/NEWS.md
+++ b/r/NEWS.md
@@ -17,6 +17,8 @@
   under the License.
 -->
 
+# arrow 0.17.0.9000
+
 # arrow 0.17.0
 
 ## Feather v2
diff --git a/ruby/red-arrow-cuda/lib/arrow-cuda/version.rb b/ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
index a8f1684..b18fcd9 100644
--- a/ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
+++ b/ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
@@ -16,7 +16,7 @@
 # under the License.
 
 module ArrowCUDA
-  VERSION = "0.17.0"
+  VERSION = "0.18.0-SNAPSHOT"
 
   module Version
     numbers, TAG = VERSION.split("-")
diff --git a/ruby/red-arrow/lib/arrow/version.rb b/ruby/red-arrow/lib/arrow/version.rb
index 1bb2012..aadef37 100644
--- a/ruby/red-arrow/lib/arrow/version.rb
+++ b/ruby/red-arrow/lib/arrow/version.rb
@@ -16,7 +16,7 @@
 # under the License.
 
 module Arrow
-  VERSION = "0.17.0"
+  VERSION = "0.18.0-SNAPSHOT"
 
   module Version
     numbers, TAG = VERSION.split("-")
diff --git a/ruby/red-gandiva/lib/gandiva/version.rb b/ruby/red-gandiva/lib/gandiva/version.rb
index 988e228..40ed214 100644
--- a/ruby/red-gandiva/lib/gandiva/version.rb
+++ b/ruby/red-gandiva/lib/gandiva/version.rb
@@ -16,7 +16,7 @@
 # under the License.
 
 module Gandiva
-  VERSION = "0.17.0"
+  VERSION = "0.18.0-SNAPSHOT"
 
   module Version
     numbers, TAG = VERSION.split("-")
diff --git a/ruby/red-parquet/lib/parquet/version.rb b/ruby/red-parquet/lib/parquet/version.rb
index 6ec29da..79dfd84 100644
--- a/ruby/red-parquet/lib/parquet/version.rb
+++ b/ruby/red-parquet/lib/parquet/version.rb
@@ -16,7 +16,7 @@
 # under the License.
 
 module Parquet
-  VERSION = "0.17.0"
+  VERSION = "0.18.0-SNAPSHOT"
 
   module Version
     numbers, TAG = VERSION.split("-")
diff --git a/ruby/red-plasma/lib/plasma/version.rb b/ruby/red-plasma/lib/plasma/version.rb
index a1af4ae..bfa023c 100644
--- a/ruby/red-plasma/lib/plasma/version.rb
+++ b/ruby/red-plasma/lib/plasma/version.rb
@@ -16,7 +16,7 @@
 # under the License.
 
 module Plasma
-  VERSION = "0.17.0"
+  VERSION = "0.18.0-SNAPSHOT"
 
   module Version
     numbers, TAG = VERSION.split("-")
diff --git a/rust/arrow-flight/Cargo.toml b/rust/arrow-flight/Cargo.toml
index a27f319..5b3f34f 100644
--- a/rust/arrow-flight/Cargo.toml
+++ b/rust/arrow-flight/Cargo.toml
@@ -18,7 +18,7 @@
 [package]
 name = "arrow-flight"
 description = "Apache Arrow Flight"
-version = "0.17.0"
+version = "0.18.0-SNAPSHOT"
 edition = "2018"
 authors = ["Apache Arrow <de...@arrow.apache.org>"]
 homepage = "https://github.com/apache/arrow"
diff --git a/rust/arrow/Cargo.toml b/rust/arrow/Cargo.toml
index 91752c9..95a0dae 100644
--- a/rust/arrow/Cargo.toml
+++ b/rust/arrow/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "arrow"
-version = "0.17.0"
+version = "0.18.0-SNAPSHOT"
 description = "Rust implementation of Apache Arrow"
 homepage = "https://github.com/apache/arrow"
 repository = "https://github.com/apache/arrow"
diff --git a/rust/datafusion/Cargo.toml b/rust/datafusion/Cargo.toml
index 8e39b71..8df50ad 100644
--- a/rust/datafusion/Cargo.toml
+++ b/rust/datafusion/Cargo.toml
@@ -18,7 +18,7 @@
 [package]
 name = "datafusion"
 description = "DataFusion is an in-memory query engine that uses Apache Arrow as the memory model"
-version = "0.17.0"
+version = "0.18.0-SNAPSHOT"
 homepage = "https://github.com/apache/arrow"
 repository = "https://github.com/apache/arrow"
 authors = ["Apache Arrow <de...@arrow.apache.org>"]
@@ -45,8 +45,8 @@ cli = ["rustyline"]
 
 [dependencies]
 fnv = "1.0"
-arrow = { path = "../arrow", version = "0.17.0" }
-parquet = { path = "../parquet", version = "0.17.0" }
+arrow = { path = "../arrow", version = "0.18.0-SNAPSHOT" }
+parquet = { path = "../parquet", version = "0.18.0-SNAPSHOT" }
 sqlparser = "0.2.5"
 clap = "2.33"
 prettytable-rs = "0.8.0"
@@ -62,7 +62,7 @@ prost = "0.6"
 tokio = { version = "0.2", features = ["macros"] }
 tonic = "0.1"
 flatbuffers = "0.6"
-arrow-flight = { path = "../arrow-flight", version = "0.17.0" }
+arrow-flight = { path = "../arrow-flight", version = "0.18.0-SNAPSHOT" }
 
 [[bench]]
 name = "aggregate_query_sql"
diff --git a/rust/datafusion/README.md b/rust/datafusion/README.md
index ffb5891..a3d4db2 100644
--- a/rust/datafusion/README.md
+++ b/rust/datafusion/README.md
@@ -27,7 +27,7 @@ DataFusion can be used as a library by adding the following to your `Cargo.toml`
 
 ```toml
 [dependencies]
-datafusion = "0.17.0"
+datafusion = "0.18.0-SNAPSHOT"
 ```
 
 ## Using DataFusion as a binary
diff --git a/rust/parquet/Cargo.toml b/rust/parquet/Cargo.toml
index 54fc49c..4ab6cc5 100644
--- a/rust/parquet/Cargo.toml
+++ b/rust/parquet/Cargo.toml
@@ -17,7 +17,7 @@
 
 [package]
 name = "parquet"
-version = "0.17.0"
+version = "0.18.0-SNAPSHOT"
 license = "Apache-2.0"
 description = "Apache Parquet implementation in Rust"
 homepage = "https://github.com/apache/arrow"
@@ -40,7 +40,7 @@ lz4 = "1.23"
 zstd = "0.5"
 chrono = "0.4"
 num-bigint = "0.2"
-arrow = { path = "../arrow", version = "0.17.0" }
+arrow = { path = "../arrow", version = "0.18.0-SNAPSHOT" }
 serde_json = { version = "1.0", features = ["preserve_order"] }
 
 [dev-dependencies]
diff --git a/rust/parquet/README.md b/rust/parquet/README.md
index 6467f18..8beb10c 100644
--- a/rust/parquet/README.md
+++ b/rust/parquet/README.md
@@ -23,7 +23,7 @@
 Add this to your Cargo.toml:
 ```toml
 [dependencies]
-parquet = "0.17.0"
+parquet = "0.18.0-SNAPSHOT"
 ```
 
 and this to your crate root:
@@ -44,7 +44,7 @@ while let Some(record) = iter.next() {
     println!("{}", record);
 }
 ```
-See [crate documentation](https://docs.rs/crate/parquet/0.17.0) on available API.
+See [crate documentation](https://docs.rs/crate/parquet/0.18.0-SNAPSHOT) on available API.
 
 ## Supported Parquet Version
 - Parquet-format 2.4.0


[arrow] 11/28: ARROW-8448: [Packaging] Update linux-packages README

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a170ecd1af5839f7acd9ca437c83a209e9d28d2d
Author: François Saint-Jacques <fs...@gmail.com>
AuthorDate: Sat Apr 18 07:32:27 2020 +0900

    ARROW-8448: [Packaging] Update linux-packages README
    
    Closes #6968 from fsaintjacques/ARROW-8448
    
    Authored-by: François Saint-Jacques <fs...@gmail.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 dev/tasks/linux-packages/README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev/tasks/linux-packages/README.md b/dev/tasks/linux-packages/README.md
index 391deed..cafcc04 100644
--- a/dev/tasks/linux-packages/README.md
+++ b/dev/tasks/linux-packages/README.md
@@ -28,11 +28,13 @@
 ## How to build .deb packages
 
 ```console
+% rake version:update
 % rake apt
 ```
 
 ## How to build .rpm packages
 
 ```console
+% rake version:update
 % rake yum
 ```


[arrow] 10/28: ARROW-8501: [Packaging][RPM] Upgrade devtoolset to 8 on CentOS 6

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 620bb2898a2b42462dee4145952bdad0c00f5415
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Apr 18 07:21:31 2020 +0900

    ARROW-8501: [Packaging][RPM] Upgrade devtoolset to 8 on CentOS 6
    
    It seems that devtoolset-6 is removed.
    
    Closes #6971 from kou/packaging-centos-6-upgrade-devtoolset
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 dev/tasks/linux-packages/apache-arrow/yum/centos-6/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/tasks/linux-packages/apache-arrow/yum/centos-6/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/centos-6/Dockerfile
index 08e6f15..60c312a 100644
--- a/dev/tasks/linux-packages/apache-arrow/yum/centos-6/Dockerfile
+++ b/dev/tasks/linux-packages/apache-arrow/yum/centos-6/Dockerfile
@@ -20,7 +20,7 @@ FROM centos:6
 ARG DEBUG
 
 ENV \
-  DEVTOOLSET_VERSION=6 \
+  DEVTOOLSET_VERSION=8 \
   LIBARCHIVE_SRPM_BASE=libarchive-3.1.2-10.el7_2.src.rpm \
   SRPM_DOWNLOAD_URL=http://vault.centos.org/7.6.1810/os/Source/SPackages
 


[arrow] 01/28: [maven-release-plugin] prepare for next development iteration

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 00f3318e86d420232fa3dcd7106de094748120eb
Author: Krisztián Szűcs <sz...@gmail.com>
AuthorDate: Thu Apr 16 15:42:45 2020 +0200

    [maven-release-plugin] prepare for next development iteration
---
 java/adapter/avro/pom.xml       | 2 +-
 java/adapter/jdbc/pom.xml       | 2 +-
 java/adapter/orc/pom.xml        | 2 +-
 java/algorithm/pom.xml          | 2 +-
 java/flight/flight-core/pom.xml | 2 +-
 java/flight/flight-grpc/pom.xml | 2 +-
 java/format/pom.xml             | 2 +-
 java/gandiva/pom.xml            | 2 +-
 java/memory/pom.xml             | 2 +-
 java/performance/pom.xml        | 4 ++--
 java/plasma/pom.xml             | 2 +-
 java/pom.xml                    | 4 ++--
 java/tools/pom.xml              | 2 +-
 java/vector/pom.xml             | 2 +-
 14 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/java/adapter/avro/pom.xml b/java/adapter/avro/pom.xml
index 0e3a7de..48bfa5f 100644
--- a/java/adapter/avro/pom.xml
+++ b/java/adapter/avro/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.arrow</groupId>
     <artifactId>arrow-java-root</artifactId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
diff --git a/java/adapter/jdbc/pom.xml b/java/adapter/jdbc/pom.xml
index c90b305..af7b669 100644
--- a/java/adapter/jdbc/pom.xml
+++ b/java/adapter/jdbc/pom.xml
@@ -16,7 +16,7 @@
     <parent>
         <groupId>org.apache.arrow</groupId>
         <artifactId>arrow-java-root</artifactId>
-        <version>0.17.0</version>
+        <version>0.18.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/java/adapter/orc/pom.xml b/java/adapter/orc/pom.xml
index bd552d8..6e97b32 100644
--- a/java/adapter/orc/pom.xml
+++ b/java/adapter/orc/pom.xml
@@ -81,7 +81,7 @@
     <parent>
         <groupId>org.apache.arrow</groupId>
         <artifactId>arrow-java-root</artifactId>
-        <version>0.17.0</version>
+        <version>0.18.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/java/algorithm/pom.xml b/java/algorithm/pom.xml
index 5e93d0e..4be665a 100644
--- a/java/algorithm/pom.xml
+++ b/java/algorithm/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.apache.arrow</groupId>
     <artifactId>arrow-java-root</artifactId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
   </parent>
   <artifactId>arrow-algorithm</artifactId>
   <name>Arrow Algorithms</name>
diff --git a/java/flight/flight-core/pom.xml b/java/flight/flight-core/pom.xml
index 8e2383a..8301c71 100644
--- a/java/flight/flight-core/pom.xml
+++ b/java/flight/flight-core/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.apache.arrow</groupId>
     <artifactId>arrow-java-root</artifactId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
diff --git a/java/flight/flight-grpc/pom.xml b/java/flight/flight-grpc/pom.xml
index 2c762cc..92c3036 100644
--- a/java/flight/flight-grpc/pom.xml
+++ b/java/flight/flight-grpc/pom.xml
@@ -13,7 +13,7 @@
   <parent>
     <artifactId>arrow-java-root</artifactId>
     <groupId>org.apache.arrow</groupId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
diff --git a/java/format/pom.xml b/java/format/pom.xml
index 541199a..753bbd7 100644
--- a/java/format/pom.xml
+++ b/java/format/pom.xml
@@ -15,7 +15,7 @@
 <parent>
   <artifactId>arrow-java-root</artifactId>
   <groupId>org.apache.arrow</groupId>
-  <version>0.17.0</version>
+  <version>0.18.0-SNAPSHOT</version>
 </parent>
 
 <artifactId>arrow-format</artifactId>
diff --git a/java/gandiva/pom.xml b/java/gandiva/pom.xml
index 5a2e209..f89b06d 100644
--- a/java/gandiva/pom.xml
+++ b/java/gandiva/pom.xml
@@ -14,7 +14,7 @@
     <parent>
       <groupId>org.apache.arrow</groupId>
       <artifactId>arrow-java-root</artifactId>
-      <version>0.17.0</version>
+      <version>0.18.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.arrow.gandiva</groupId>
diff --git a/java/memory/pom.xml b/java/memory/pom.xml
index 9cb9181..45d1c98 100644
--- a/java/memory/pom.xml
+++ b/java/memory/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.apache.arrow</groupId>
     <artifactId>arrow-java-root</artifactId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
   </parent>
   <artifactId>arrow-memory</artifactId>
   <name>Arrow Memory</name>
diff --git a/java/performance/pom.xml b/java/performance/pom.xml
index 1495f8b..7d04df1 100644
--- a/java/performance/pom.xml
+++ b/java/performance/pom.xml
@@ -14,7 +14,7 @@
     <parent>
         <artifactId>arrow-java-root</artifactId>
         <groupId>org.apache.arrow</groupId>
-        <version>0.17.0</version>
+        <version>0.18.0-SNAPSHOT</version>
     </parent>
     <artifactId>arrow-performance</artifactId>
     <packaging>jar</packaging>
@@ -80,7 +80,7 @@
         <dependency>
             <groupId>org.apache.arrow</groupId>
             <artifactId>arrow-algorithm</artifactId>
-            <version>0.17.0</version>
+            <version>0.18.0-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/java/plasma/pom.xml b/java/plasma/pom.xml
index bd8a258..8a8a618 100644
--- a/java/plasma/pom.xml
+++ b/java/plasma/pom.xml
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.apache.arrow</groupId>
         <artifactId>arrow-java-root</artifactId>
-        <version>0.17.0</version>
+        <version>0.18.0-SNAPSHOT</version>
     </parent>
     <artifactId>arrow-plasma</artifactId>
     <name>Arrow Plasma Client</name>
diff --git a/java/pom.xml b/java/pom.xml
index be76d84..6a563ad 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -20,7 +20,7 @@
 
   <groupId>org.apache.arrow</groupId>
   <artifactId>arrow-java-root</artifactId>
-  <version>0.17.0</version>
+  <version>0.18.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Arrow Java Root POM</name>
@@ -49,7 +49,7 @@
     <connection>scm:git:https://github.com/apache/arrow.git</connection>
     <developerConnection>scm:git:https://github.com/apache/arrow.git</developerConnection>
     <url>https://github.com/apache/arrow</url>
-    <tag>apache-arrow-0.17.0</tag>
+    <tag>apache-arrow-0.10.0</tag>
   </scm>
 
   <mailingLists>
diff --git a/java/tools/pom.xml b/java/tools/pom.xml
index 959960d..cdc443d 100644
--- a/java/tools/pom.xml
+++ b/java/tools/pom.xml
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.apache.arrow</groupId>
         <artifactId>arrow-java-root</artifactId>
-        <version>0.17.0</version>
+        <version>0.18.0-SNAPSHOT</version>
     </parent>
     <artifactId>arrow-tools</artifactId>
     <name>Arrow Tools</name>
diff --git a/java/vector/pom.xml b/java/vector/pom.xml
index c9e8839..7d2fb85 100644
--- a/java/vector/pom.xml
+++ b/java/vector/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.apache.arrow</groupId>
     <artifactId>arrow-java-root</artifactId>
-    <version>0.17.0</version>
+    <version>0.18.0-SNAPSHOT</version>
   </parent>
   <artifactId>arrow-vector</artifactId>
   <name>Arrow Vectors</name>


[arrow] 05/28: ARROW-6439: [R] Implement S3 file-system interface in R

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bb69967407dd67af23f1585d17b859dfacc7545b
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Thu Apr 16 16:09:20 2020 -0700

    ARROW-6439: [R] Implement S3 file-system interface in R
    
    This patch does the foundational work to conditionally build the S3 bindings if the C++ library was built with ARROW_S3=ON. It also adds bindings for `FileSystemFromUri` and enough wiring up in the datasets code so that `open_dataset("s3://ursa-labs-taxi-data", partitioning = c("year", "month"))` works.
    
    There's lots of other S3FileSystem methods that probably should be implemented and aren't here. Also, calling `S3FileSystem$create()` segfaults. But `FileSystemFromUri` works fine.
    
    Closes #6901 from nealrichardson/r-s3
    
    Lead-authored-by: Neal Richardson <ne...@gmail.com>
    Co-authored-by: François Saint-Jacques <fs...@gmail.com>
    Signed-off-by: Neal Richardson <ne...@gmail.com>
---
 .github/workflows/r.yml            |  3 ++
 ci/scripts/cpp_test.sh             |  4 +++
 ci/scripts/r_test.sh               |  3 ++
 r/NAMESPACE                        |  1 +
 r/R/arrowExports.R                 | 16 +++++++++
 r/R/dataset.R                      | 34 ++++++------------
 r/R/filesystem.R                   | 33 +++++++++++++++++
 r/configure                        |  6 ++++
 r/data-raw/codegen.R               | 50 +++++++++++++++++---------
 r/man/FileSystem.Rd                |  1 +
 r/man/cpu_count.Rd                 | 10 ++++--
 r/man/dataset_factory.Rd           | 16 +++------
 r/man/set_cpu_count.Rd             | 14 --------
 r/src/arrowExports.cpp             | 74 ++++++++++++++++++++++++++++++++++++++
 r/src/arrow_types.h                |  1 +
 r/src/filesystem.cpp               | 27 ++++++++++++++
 r/tests/testthat/helper-skip.R     |  5 +--
 r/tests/testthat/test-dataset.R    | 18 ++++++++++
 r/tests/testthat/test-filesystem.R | 15 ++++++++
 19 files changed, 262 insertions(+), 69 deletions(-)

diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index fdca3bd..a9f7293 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -156,6 +156,9 @@ jobs:
         with:
           fetch-depth: 0
       - name: Make R tests verbose
+        # If you get a segfault/mysterious test Execution halted,
+        # make this `true` to see where it dies.
+        if: false
         shell: cmd
         run: |
           cd r/tests
diff --git a/ci/scripts/cpp_test.sh b/ci/scripts/cpp_test.sh
index 697241e..21284ee 100755
--- a/ci/scripts/cpp_test.sh
+++ b/ci/scripts/cpp_test.sh
@@ -28,6 +28,10 @@ export ARROW_TEST_DATA=${arrow_dir}/testing/data
 export PARQUET_TEST_DATA=${source_dir}/submodules/parquet-testing/data
 export LD_LIBRARY_PATH=${ARROW_HOME}/${CMAKE_INSTALL_LIBDIR:-lib}:${LD_LIBRARY_PATH}
 
+# By default, aws-sdk tries to contact a non-existing local ip host
+# to retrieve metadata. Disable this so that S3FileSystem tests run faster.
+export AWS_EC2_METADATA_DISABLED=TRUE
+
 case "$(uname)" in
   Linux)
     n_jobs=$(nproc)
diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh
index e79fac5..df6b169 100755
--- a/ci/scripts/r_test.sh
+++ b/ci/scripts/r_test.sh
@@ -42,6 +42,9 @@ export _R_CHECK_TESTS_NLINES_=0
 export _R_CHECK_CRAN_INCOMING_REMOTE_=FALSE
 export _R_CHECK_LIMIT_CORES_=FALSE
 export VERSION=$(grep ^Version DESCRIPTION | sed s/Version:\ //)
+# By default, aws-sdk tries to contact a non-existing local ip host
+# to retrieve metadata. Disable this so that S3FileSystem tests run faster.
+export AWS_EC2_METADATA_DISABLED=TRUE
 
 # Make sure we aren't writing to the home dir (CRAN _hates_ this but there is no official check)
 BEFORE=$(ls -alh ~/)
diff --git a/r/NAMESPACE b/r/NAMESPACE
index 598a7f0..568c72f 100644
--- a/r/NAMESPACE
+++ b/r/NAMESPACE
@@ -119,6 +119,7 @@ export(RecordBatchFileReader)
 export(RecordBatchFileWriter)
 export(RecordBatchStreamReader)
 export(RecordBatchStreamWriter)
+export(S3FileSystem)
 export(ScalarExpression)
 export(Scanner)
 export(ScannerBuilder)
diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R
index c7407b3..581d976 100644
--- a/r/R/arrowExports.R
+++ b/r/R/arrowExports.R
@@ -872,6 +872,10 @@ fs___FileSystem__OpenAppendStream <- function(file_system, path){
     .Call(`_arrow_fs___FileSystem__OpenAppendStream` , file_system, path)
 }
 
+fs___FileSystem__type_name <- function(file_system){
+    .Call(`_arrow_fs___FileSystem__type_name` , file_system)
+}
+
 fs___LocalFileSystem__create <- function(){
     .Call(`_arrow_fs___LocalFileSystem__create` )
 }
@@ -880,6 +884,18 @@ fs___SubTreeFileSystem__create <- function(base_path, base_fs){
     .Call(`_arrow_fs___SubTreeFileSystem__create` , base_path, base_fs)
 }
 
+fs___FileSystemFromUri <- function(path){
+    .Call(`_arrow_fs___FileSystemFromUri` , path)
+}
+
+fs___EnsureS3Initialized <- function(){
+    invisible(.Call(`_arrow_fs___EnsureS3Initialized` ))
+}
+
+fs___S3FileSystem__create <- function(){
+    .Call(`_arrow_fs___S3FileSystem__create` )
+}
+
 io___Readable__Read <- function(x, nbytes){
     .Call(`_arrow_io___Readable__Read` , x, nbytes)
 }
diff --git a/r/R/dataset.R b/r/R/dataset.R
index 3ef8950..1baec6c 100644
--- a/r/R/dataset.R
+++ b/r/R/dataset.R
@@ -268,11 +268,9 @@ DatasetFactory <- R6Class("DatasetFactory", inherit = ArrowObject,
   )
 )
 DatasetFactory$create <- function(x,
-                                  filesystem = c("auto", "local"),
+                                  filesystem = NULL,
                                   format = c("parquet", "arrow", "ipc", "feather"),
                                   partitioning = NULL,
-                                  allow_not_found = FALSE,
-                                  recursive = TRUE,
                                   ...) {
   if (is_list_of(x, "DatasetFactory")) {
     return(shared_ptr(DatasetFactory, dataset___UnionDatasetFactory__Make(x)))
@@ -282,21 +280,15 @@ DatasetFactory$create <- function(x,
   }
 
   if (!inherits(filesystem, "FileSystem")) {
-    filesystem <- match.arg(filesystem)
-    if (filesystem == "auto") {
-      # When there are other FileSystems supported, detect e.g. S3 from x
-      filesystem <- "local"
+    if (grepl("://", x)) {
+      fs_from_uri <- FileSystem$from_uri(x)
+      filesystem <- fs_from_uri$fs
+      x <- fs_from_uri$path
+    } else {
+      filesystem <- LocalFileSystem$create()
     }
-    filesystem <- list(
-      local = LocalFileSystem
-      # We'll register other file systems here
-    )[[filesystem]]$create(...)
   }
-  selector <- FileSelector$create(
-    x,
-    allow_not_found = allow_not_found,
-    recursive = recursive
-  )
+  selector <- FileSelector$create(x, allow_not_found = FALSE, recursive = TRUE)
 
   if (is.character(format)) {
     format <- FileFormat$create(match.arg(format))
@@ -331,8 +323,8 @@ DatasetFactory$create <- function(x,
 #' a list of `DatasetFactory` objects whose datasets should be
 #' grouped. If this argument is specified it will be used to construct a
 #' `UnionDatasetFactory` and other arguments will be ignored.
-#' @param filesystem A string identifier for the filesystem corresponding to
-#' `x`. Currently only "local" is supported.
+#' @param filesystem A [FileSystem] object; if omitted, the `FileSystem` will
+#' be detected from `x`
 #' @param format A string identifier of the format of the files in `x`.
 #' Currently "parquet" and "ipc"/"arrow"/"feather" (aliases for each other)
 #' are supported. For Feather, only version 2 files are supported.
@@ -348,11 +340,7 @@ DatasetFactory$create <- function(x,
 #'    by [hive_partition()] which parses explicit or autodetected fields from
 #'    Hive-style path segments
 #'   * `NULL` for no partitioning
-#' @param allow_not_found logical: is `x` allowed to not exist? Default
-#' `FALSE`. See [FileSelector].
-#' @param recursive logical: should files be discovered in subdirectories of
-#' `x`? Default `TRUE`.
-#' @param ... Additional arguments passed to the [FileSystem] `$create()` method
+#' @param ... Additional arguments, currently ignored
 #' @return A `DatasetFactory` object. Pass this to [open_dataset()],
 #' in a list potentially with other `DatasetFactory` objects, to create
 #' a `Dataset`.
diff --git a/r/R/filesystem.R b/r/R/filesystem.R
index 939764b..f0e123a 100644
--- a/r/R/filesystem.R
+++ b/r/R/filesystem.R
@@ -166,6 +166,18 @@ FileSelector$create <- function(base_dir, allow_not_found = FALSE, recursive = F
 #' @export
 FileSystem <- R6Class("FileSystem", inherit = ArrowObject,
   public = list(
+    ..dispatch = function() {
+      type_name <- self$type_name
+      if (type_name == "local") {
+        shared_ptr(LocalFileSystem, self$pointer())
+      } else if (type_name == "s3") {
+        shared_ptr(S3FileSystem, self$pointer())
+      } else if (type_name == "subtree") {
+        shared_ptr(SubTreeFileSystem, self$pointer())
+      } else {
+        self
+      }
+    },
     GetFileInfo = function(x) {
       if (inherits(x, "FileSelector")) {
         map(
@@ -224,8 +236,16 @@ FileSystem <- R6Class("FileSystem", inherit = ArrowObject,
     OpenAppendStream = function(path) {
       shared_ptr(OutputStream, fs___FileSystem__OpenAppendStream(self, clean_path_rel(path)))
     }
+  ),
+  active = list(
+    type_name = function() fs___FileSystem__type_name(self)
   )
 )
+FileSystem$from_uri <- function(uri) {
+  out <- fs___FileSystemFromUri(uri)
+  out$fs <- shared_ptr(FileSystem, out$fs)$..dispatch()
+  out
+}
 
 #' @usage NULL
 #' @format NULL
@@ -236,6 +256,19 @@ LocalFileSystem$create <- function() {
   shared_ptr(LocalFileSystem, fs___LocalFileSystem__create())
 }
 
+#' @usage NULL
+#' @format NULL
+#' @rdname FileSystem
+#' @export
+S3FileSystem <- R6Class("S3FileSystem", inherit = FileSystem)
+S3FileSystem$create <- function() {
+  fs___EnsureS3Initialized()
+  shared_ptr(S3FileSystem, fs___S3FileSystem__create())
+}
+
+arrow_with_s3 <- function() {
+  .Call(`_s3_available`)
+}
 
 #' @usage NULL
 #' @format NULL
diff --git a/r/configure b/r/configure
index a8dedcb..3afbb28 100755
--- a/r/configure
+++ b/r/configure
@@ -159,6 +159,12 @@ echo "#include $PKG_TEST_HEADER" | ${TEST_CMD} >/dev/null 2>&1
 if [ $? -eq 0 ] || [ "$UNAME" = "Darwin" ]; then
   # Always build with arrow on macOS
   PKG_CFLAGS="$PKG_CFLAGS -DARROW_R_WITH_ARROW"
+  # Check for features
+  LIB_DIR=`echo $PKG_LIBS | sed -e 's/ -l.*//' | sed -e 's/^-L//'`
+  grep 'set(ARROW_S3 "ON")' $LIB_DIR/cmake/arrow/ArrowOptions.cmake >/dev/null 2>&1
+  if [ $? -eq 0 ]; then
+    PKG_CFLAGS="$PKG_CFLAGS -DARROW_R_WITH_S3"
+  fi
   echo "PKG_CFLAGS=$PKG_CFLAGS"
   echo "PKG_LIBS=$PKG_LIBS"
 else
diff --git a/r/data-raw/codegen.R b/r/data-raw/codegen.R
index b90f854..54c1d12 100644
--- a/r/data-raw/codegen.R
+++ b/r/data-raw/codegen.R
@@ -48,16 +48,19 @@ if (packageVersion("decor") < '0.0.0.9001') {
   stop("more recent version of `decor` needed, please install with `remotes::install_github('romainfrancois/decor')`")
 }
 
-decorations <- cpp_decorations() %>%
-  filter(decoration == "arrow::export") %>%
-  # the three lines below can be expressed with rap()
-  # more concisely
-  # rap(            ~ decor:::parse_cpp_function(context))
-  mutate(functions = map(context, decor:::parse_cpp_function)) %>%
-  { vec_cbind(., vec_rbind(!!!pull(., functions))) } %>%
-  select(-functions)
-
-message(glue("*** > {n} functions decorated with [[arrow::export]]", n = nrow(decorations)))
+get_exported_functions <- function(decorations, export_tag) {
+  out <- decorations %>%
+    filter(decoration %in% paste0(export_tag, "::export")) %>%
+    # the three lines below can be expressed with rap()
+    # more concisely
+    # rap(            ~ decor:::parse_cpp_function(context))
+    mutate(functions = map(context, decor:::parse_cpp_function)) %>%
+    { vec_cbind(., vec_rbind(!!!pull(., functions))) } %>%
+    select(-functions) %>%
+    mutate(decoration = sub("::export", "", decoration))
+  message(glue("*** > {n} functions decorated with [[{tags}::export]]", n = nrow(out), tags = paste0(export_tag, collapse = "|")))
+  out
+}
 
 glue_collapse_data <- function(data, ..., sep = ", ", last = "") {
   res <- glue_collapse(glue_data(data, ...), sep = sep, last = last)
@@ -73,12 +76,16 @@ wrap_call <- function(name, return_type, args) {
     glue::glue("\treturn Rcpp::wrap({call});")
   }
 }
-cpp_functions_definitions <- decorations %>%
-  select(name, return_type, args, file, line) %>%
-  pmap_chr(function(name, return_type, args, file, line){
+
+all_decorations <- cpp_decorations()
+arrow_exports <- get_exported_functions(all_decorations, c("arrow", "s3"))
+
+cpp_functions_definitions <- arrow_exports %>%
+  select(name, return_type, args, file, line, decoration) %>%
+  pmap_chr(function(name, return_type, args, file, line, decoration){
     glue::glue('
     // {basename(file)}
-    #if defined(ARROW_R_WITH_ARROW)
+    #if defined(ARROW_R_WITH_{toupper(decoration)})
     {return_type} {name}({real_params});
     RcppExport SEXP _arrow_{name}({sexp_params}){{
     BEGIN_RCPP
@@ -101,7 +108,7 @@ cpp_functions_definitions <- decorations %>%
   }) %>%
   glue_collapse(sep = "\n")
 
-cpp_functions_registration <- decorations %>%
+cpp_functions_registration <- arrow_exports %>%
   select(name, return_type, args) %>%
   pmap_chr(function(name, return_type, args){
     glue('\t\t{{ "_arrow_{name}", (DL_FUNC) &_arrow_{name}, {nrow(args)}}}, ')
@@ -127,8 +134,19 @@ return Rf_ScalarLogical(
 );
 }}
 
+extern "C" SEXP _s3_available() {{
+return Rf_ScalarLogical(
+#if defined(ARROW_R_WITH_S3)
+  TRUE
+#else
+  FALSE
+#endif
+);
+}}
+
 static const R_CallMethodDef CallEntries[] = {{
 \t\t{{ "_arrow_available", (DL_FUNC)& _arrow_available, 0 }},
+\t\t{{ "_s3_available", (DL_FUNC)& _s3_available, 0 }},
 {cpp_functions_registration}
 \t\t{{NULL, NULL, 0}}
 }};
@@ -142,7 +160,7 @@ RcppExport void R_init_arrow(DllInfo* dll){{
 
 message("*** > generated file `src/arrowExports.cpp`")
 
-r_functions <- decorations %>%
+r_functions <- arrow_exports %>%
   select(name, return_type, args) %>%
   pmap_chr(function(name, return_type, args) {
     params <- if (nrow(args)) {
diff --git a/r/man/FileSystem.Rd b/r/man/FileSystem.Rd
index 5b627f2..a675c5b 100644
--- a/r/man/FileSystem.Rd
+++ b/r/man/FileSystem.Rd
@@ -4,6 +4,7 @@
 \name{FileSystem}
 \alias{FileSystem}
 \alias{LocalFileSystem}
+\alias{S3FileSystem}
 \alias{SubTreeFileSystem}
 \title{FileSystem classes}
 \description{
diff --git a/r/man/cpu_count.Rd b/r/man/cpu_count.Rd
index 5764da6..f2abfc1 100644
--- a/r/man/cpu_count.Rd
+++ b/r/man/cpu_count.Rd
@@ -2,10 +2,16 @@
 % Please edit documentation in R/config.R
 \name{cpu_count}
 \alias{cpu_count}
-\title{Return number of threads used by the global CPU thread pool in libarrow}
+\alias{set_cpu_count}
+\title{Manage the global CPU thread pool in libarrow}
 \usage{
 cpu_count()
+
+set_cpu_count(num_threads)
+}
+\arguments{
+\item{num_threads}{integer: New number of threads for thread pool}
 }
 \description{
-Return number of threads used by the global CPU thread pool in libarrow
+Manage the global CPU thread pool in libarrow
 }
diff --git a/r/man/dataset_factory.Rd b/r/man/dataset_factory.Rd
index b905d3f..c995053 100644
--- a/r/man/dataset_factory.Rd
+++ b/r/man/dataset_factory.Rd
@@ -6,11 +6,9 @@
 \usage{
 dataset_factory(
   x,
-  filesystem = c("auto", "local"),
+  filesystem = NULL,
   format = c("parquet", "arrow", "ipc", "feather"),
   partitioning = NULL,
-  allow_not_found = FALSE,
-  recursive = TRUE,
   ...
 )
 }
@@ -20,8 +18,8 @@ a list of \code{DatasetFactory} objects whose datasets should be
 grouped. If this argument is specified it will be used to construct a
 \code{UnionDatasetFactory} and other arguments will be ignored.}
 
-\item{filesystem}{A string identifier for the filesystem corresponding to
-\code{x}. Currently only "local" is supported.}
+\item{filesystem}{A \link{FileSystem} object; if omitted, the \code{FileSystem} will
+be detected from \code{x}}
 
 \item{format}{A string identifier of the format of the files in \code{x}.
 Currently "parquet" and "ipc"/"arrow"/"feather" (aliases for each other)
@@ -42,13 +40,7 @@ Hive-style path segments
 \item \code{NULL} for no partitioning
 }}
 
-\item{allow_not_found}{logical: is \code{x} allowed to not exist? Default
-\code{FALSE}. See \link{FileSelector}.}
-
-\item{recursive}{logical: should files be discovered in subdirectories of
-\code{x}? Default \code{TRUE}.}
-
-\item{...}{Additional arguments passed to the \link{FileSystem} \verb{$create()} method}
+\item{...}{Additional arguments, currently ignored}
 }
 \value{
 A \code{DatasetFactory} object. Pass this to \code{\link[=open_dataset]{open_dataset()}},
diff --git a/r/man/set_cpu_count.Rd b/r/man/set_cpu_count.Rd
deleted file mode 100644
index dc36e91..0000000
--- a/r/man/set_cpu_count.Rd
+++ /dev/null
@@ -1,14 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/config.R
-\name{set_cpu_count}
-\alias{set_cpu_count}
-\title{Set number of threads used by the global CPU thread pool in libarrow}
-\usage{
-set_cpu_count(num_threads)
-}
-\arguments{
-\item{num_threads}{integer: New number of threads for thread pool}
-}
-\description{
-Set number of threads used by the global CPU thread pool in libarrow
-}
diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp
index 599f8d2..f05cc95 100644
--- a/r/src/arrowExports.cpp
+++ b/r/src/arrowExports.cpp
@@ -3406,6 +3406,21 @@ RcppExport SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp,
 
 // filesystem.cpp
 #if defined(ARROW_R_WITH_ARROW)
+std::string fs___FileSystem__type_name(const std::shared_ptr<fs::FileSystem>& file_system);
+RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){
+BEGIN_RCPP
+	Rcpp::traits::input_parameter<const std::shared_ptr<fs::FileSystem>&>::type file_system(file_system_sexp);
+	return Rcpp::wrap(fs___FileSystem__type_name(file_system));
+END_RCPP
+}
+#else
+RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){
+	Rf_error("Cannot call fs___FileSystem__type_name(). Please use arrow::install_arrow() to install required runtime libraries. ");
+}
+#endif
+
+// filesystem.cpp
+#if defined(ARROW_R_WITH_ARROW)
 std::shared_ptr<fs::LocalFileSystem> fs___LocalFileSystem__create();
 RcppExport SEXP _arrow_fs___LocalFileSystem__create(){
 BEGIN_RCPP
@@ -3434,6 +3449,50 @@ RcppExport SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP
 }
 #endif
 
+// filesystem.cpp
+#if defined(ARROW_R_WITH_ARROW)
+Rcpp::List fs___FileSystemFromUri(const std::string& path);
+RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){
+BEGIN_RCPP
+	Rcpp::traits::input_parameter<const std::string&>::type path(path_sexp);
+	return Rcpp::wrap(fs___FileSystemFromUri(path));
+END_RCPP
+}
+#else
+RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){
+	Rf_error("Cannot call fs___FileSystemFromUri(). Please use arrow::install_arrow() to install required runtime libraries. ");
+}
+#endif
+
+// filesystem.cpp
+#if defined(ARROW_R_WITH_S3)
+void fs___EnsureS3Initialized();
+RcppExport SEXP _arrow_fs___EnsureS3Initialized(){
+BEGIN_RCPP
+	fs___EnsureS3Initialized();
+	return R_NilValue;
+END_RCPP
+}
+#else
+RcppExport SEXP _arrow_fs___EnsureS3Initialized(){
+	Rf_error("Cannot call fs___EnsureS3Initialized(). Please use arrow::install_arrow() to install required runtime libraries. ");
+}
+#endif
+
+// filesystem.cpp
+#if defined(ARROW_R_WITH_S3)
+std::shared_ptr<fs::S3FileSystem> fs___S3FileSystem__create();
+RcppExport SEXP _arrow_fs___S3FileSystem__create(){
+BEGIN_RCPP
+	return Rcpp::wrap(fs___S3FileSystem__create());
+END_RCPP
+}
+#else
+RcppExport SEXP _arrow_fs___S3FileSystem__create(){
+	Rf_error("Cannot call fs___S3FileSystem__create(). Please use arrow::install_arrow() to install required runtime libraries. ");
+}
+#endif
+
 // io.cpp
 #if defined(ARROW_R_WITH_ARROW)
 std::shared_ptr<arrow::Buffer> io___Readable__Read(const std::shared_ptr<arrow::io::Readable>& x, int64_t nbytes);
@@ -5810,8 +5869,19 @@ return Rf_ScalarLogical(
 );
 }
 
+extern "C" SEXP _s3_available() {
+return Rf_ScalarLogical(
+#if defined(ARROW_R_WITH_S3)
+  TRUE
+#else
+  FALSE
+#endif
+);
+}
+
 static const R_CallMethodDef CallEntries[] = {
 		{ "_arrow_available", (DL_FUNC)& _arrow_available, 0 },
+		{ "_s3_available", (DL_FUNC)& _s3_available, 0 },
 		{ "_arrow_Array__Slice1", (DL_FUNC) &_arrow_Array__Slice1, 2}, 
 		{ "_arrow_Array__Slice2", (DL_FUNC) &_arrow_Array__Slice2, 3}, 
 		{ "_arrow_Array__IsNull", (DL_FUNC) &_arrow_Array__IsNull, 2}, 
@@ -6030,8 +6100,12 @@ static const R_CallMethodDef CallEntries[] = {
 		{ "_arrow_fs___FileSystem__OpenInputFile", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputFile, 2}, 
 		{ "_arrow_fs___FileSystem__OpenOutputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenOutputStream, 2}, 
 		{ "_arrow_fs___FileSystem__OpenAppendStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenAppendStream, 2}, 
+		{ "_arrow_fs___FileSystem__type_name", (DL_FUNC) &_arrow_fs___FileSystem__type_name, 1}, 
 		{ "_arrow_fs___LocalFileSystem__create", (DL_FUNC) &_arrow_fs___LocalFileSystem__create, 0}, 
 		{ "_arrow_fs___SubTreeFileSystem__create", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__create, 2}, 
+		{ "_arrow_fs___FileSystemFromUri", (DL_FUNC) &_arrow_fs___FileSystemFromUri, 1}, 
+		{ "_arrow_fs___EnsureS3Initialized", (DL_FUNC) &_arrow_fs___EnsureS3Initialized, 0}, 
+		{ "_arrow_fs___S3FileSystem__create", (DL_FUNC) &_arrow_fs___S3FileSystem__create, 0}, 
 		{ "_arrow_io___Readable__Read", (DL_FUNC) &_arrow_io___Readable__Read, 2}, 
 		{ "_arrow_io___InputStream__Close", (DL_FUNC) &_arrow_io___InputStream__Close, 1}, 
 		{ "_arrow_io___OutputStream__Close", (DL_FUNC) &_arrow_io___OutputStream__Close, 1}, 
diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h
index 502ee4d..bcc1869 100644
--- a/r/src/arrow_types.h
+++ b/r/src/arrow_types.h
@@ -203,6 +203,7 @@ inline std::shared_ptr<T> extract(SEXP x) {
 #include <arrow/dataset/api.h>
 #include <arrow/filesystem/filesystem.h>
 #include <arrow/filesystem/localfs.h>
+#include <arrow/filesystem/s3fs.h>
 #include <arrow/io/compressed.h>
 #include <arrow/io/file.h>
 #include <arrow/io/memory.h>
diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp
index b1e0d61..54f2491 100644
--- a/r/src/filesystem.cpp
+++ b/r/src/filesystem.cpp
@@ -199,6 +199,12 @@ std::shared_ptr<arrow::io::OutputStream> fs___FileSystem__OpenAppendStream(
 }
 
 // [[arrow::export]]
+std::string fs___FileSystem__type_name(
+    const std::shared_ptr<fs::FileSystem>& file_system) {
+  return file_system->type_name();
+}
+
+// [[arrow::export]]
 std::shared_ptr<fs::LocalFileSystem> fs___LocalFileSystem__create() {
   return std::make_shared<fs::LocalFileSystem>();
 }
@@ -209,4 +215,25 @@ std::shared_ptr<fs::SubTreeFileSystem> fs___SubTreeFileSystem__create(
   return std::make_shared<fs::SubTreeFileSystem>(base_path, base_fs);
 }
 
+// [[arrow::export]]
+Rcpp::List fs___FileSystemFromUri(const std::string& path) {
+  std::string out_path;
+  auto file_system = VALUE_OR_STOP(fs::FileSystemFromUri(path, &out_path));
+  return Rcpp::List::create(Rcpp::Named("fs") = file_system,
+                            Rcpp::Named("path") = out_path);
+}
+
+#endif
+
+#if defined(ARROW_R_WITH_S3)
+
+// [[s3::export]]
+void fs___EnsureS3Initialized() { STOP_IF_NOT_OK(fs::EnsureS3Initialized()); }
+
+// [[s3::export]]
+std::shared_ptr<fs::S3FileSystem> fs___S3FileSystem__create() {
+  auto opts = fs::S3Options::Defaults();
+  return VALUE_OR_STOP(fs::S3FileSystem::Make(opts));
+}
+
 #endif
diff --git a/r/tests/testthat/helper-skip.R b/r/tests/testthat/helper-skip.R
index 2026021..78c70ec 100644
--- a/r/tests/testthat/helper-skip.R
+++ b/r/tests/testthat/helper-skip.R
@@ -16,8 +16,9 @@
 # under the License.
 
 skip_if_not_available <- function(feature) {
-  # This is currently for compression only but we can extend to other features
-  if (!codec_is_available(feature)) {
+  if (feature == "s3") {
+    skip_if_not(arrow_with_s3())
+  } else if (!codec_is_available(feature)) {
     skip(paste("Arrow C++ not built with support for", feature))
   }
 }
diff --git a/r/tests/testthat/test-dataset.R b/r/tests/testthat/test-dataset.R
index 03a0a4b..acf4d73 100644
--- a/r/tests/testthat/test-dataset.R
+++ b/r/tests/testthat/test-dataset.R
@@ -118,6 +118,24 @@ test_that("dim() correctly determine numbers of rows and columns on arrow_dplyr_
 
 })
 
+test_that("dataset from URI", {
+  skip_on_os("windows")
+  uri <- paste0("file://", dataset_dir)
+  ds <- open_dataset(uri, partitioning = schema(part = uint8()))
+  expect_is(ds, "Dataset")
+  expect_equivalent(
+    ds %>%
+      select(chr, dbl) %>%
+      filter(dbl > 7 & dbl < 53L) %>%
+      collect() %>%
+      arrange(dbl),
+    rbind(
+      df1[8:10, c("chr", "dbl")],
+      df2[1:2, c("chr", "dbl")]
+    )
+  )
+})
+
 test_that("Simple interface for datasets (custom ParquetFileFormat)", {
   ds <- open_dataset(dataset_dir, partitioning = schema(part = uint8()),
                      format = FileFormat$create("parquet", dict_columns = c("chr")))
diff --git a/r/tests/testthat/test-filesystem.R b/r/tests/testthat/test-filesystem.R
index 8fddf7a..fc0e02f 100644
--- a/r/tests/testthat/test-filesystem.R
+++ b/r/tests/testthat/test-filesystem.R
@@ -19,6 +19,7 @@ context("File system")
 
 test_that("LocalFilesystem", {
   fs <- LocalFileSystem$create()
+  expect_identical(fs$type_name, "local")
   DESCRIPTION <- system.file("DESCRIPTION", package = "arrow")
   info <- fs$GetFileInfo(DESCRIPTION)[[1]]
   expect_equal(info$base_name(), "DESCRIPTION")
@@ -122,3 +123,17 @@ test_that("LocalFileSystem + Selector", {
   expect_equal(sum(types == FileType$File), 2L)
   expect_equal(sum(types == FileType$Directory), 1L)
 })
+
+test_that("FileSystem$from_uri", {
+  skip_on_cran()
+  skip_if_not_available("s3")
+  fs_and_path <- FileSystem$from_uri("s3://ursa-labs-taxi-data")
+  expect_is(fs_and_path$fs, "S3FileSystem")
+})
+
+test_that("S3FileSystem", {
+  skip_on_cran()
+  skip_if_not_available("s3")
+  s3fs <- S3FileSystem$create()
+  expect_is(s3fs, "S3FileSystem")
+})


[arrow] 22/28: ARROW-8520: [Developer] Use .asf.yaml to direct GitHub notifications to JIRA and mailing lists

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 046c1d9b61865b90e9dcda8a340bfde820f59fb3
Author: Wes McKinney <we...@apache.org>
AuthorDate: Sun Apr 19 17:38:28 2020 -0500

    ARROW-8520: [Developer] Use .asf.yaml to direct GitHub notifications to JIRA and mailing lists
    
    Context: INFRA-20149
    
    Following instructions per https://s.apache.org/asfyaml-notify
    
    Closes #6984 from wesm/asf-yaml
    
    Authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Wes McKinney <we...@apache.org>
    
    Remove jira notifications for now
    
    it's jira_options
---
 .asf.yaml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..4bd5191
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,22 @@
+# 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.
+
+notifications:
+  commits:      commits@arrow.apache.org
+  issues:       github@arrow.apache.org
+  pullrequests: github@arrow.apache.org
+  jira_options: link label worklog


[arrow] 03/28: [Release] Update .deb package names for 0.18.0

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 80ae659be9bf18462a91aca23f98168ee4b9a5a1
Author: Krisztián Szűcs <sz...@gmail.com>
AuthorDate: Thu Apr 16 15:43:50 2020 +0200

    [Release] Update .deb package names for 0.18.0
---
 dev/release/rat_exclude_files.txt                  |  52 +--
 .../apache-arrow/debian.ubuntu-xenial/control      |  78 ++--
 .../libarrow-cuda-glib18.install}                  |   0
 .../libarrow-cuda18.install}                       |   0
 .../libarrow-dataset18.install}                    |   0
 .../libarrow-glib18.install}                       |   0
 .../libarrow-python18.install}                     |   0
 .../libarrow18.install}                            |   0
 .../libgandiva-glib18.install}                     |   0
 .../libgandiva18.install}                          |   0
 .../libparquet-glib18.install}                     |   0
 .../libparquet18.install}                          |   0
 .../libplasma-glib18.install}                      |   0
 .../libplasma18.install}                           |   0
 .../linux-packages/apache-arrow/debian/control     |  94 ++---
 .../libarrow-cuda-glib18.install}                  |   0
 .../libarrow-cuda18.install}                       |   0
 .../libarrow-dataset18.install}                    |   0
 ...-flight17.install => libarrow-flight18.install} |   0
 .../libarrow-glib18.install}                       |   0
 ...17.install => libarrow-python-flight18.install} |   0
 .../libarrow-python18.install}                     |   0
 .../libarrow18.install}                            |   0
 .../libgandiva-glib18.install}                     |   0
 .../libgandiva18.install}                          |   0
 .../libparquet-glib18.install}                     |   0
 .../libparquet18.install}                          |   0
 .../libplasma-glib18.install}                      |   0
 .../libplasma18.install}                           |   0
 dev/tasks/tasks.yml                                | 404 ++++++++++-----------
 30 files changed, 314 insertions(+), 314 deletions(-)

diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index 25b168c..486994c 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -61,37 +61,37 @@ dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib-dev.ins
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib-dev.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset-dev.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python-dev.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python17.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python18.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma17.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma18.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/patches/series
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/plasma-store-server.install
 dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/rules
@@ -109,41 +109,41 @@ dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib17.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib18.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib-dev.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda17.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda18.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset-dev.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset17.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset18.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight-dev.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight17.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight18.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight-dev.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight17.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow-python17.install
-dev/tasks/linux-packages/apache-arrow/debian/libarrow17.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight18.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow-python18.install
+dev/tasks/linux-packages/apache-arrow/debian/libarrow18.install
 dev/tasks/linux-packages/apache-arrow/debian/libgandiva-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian/libgandiva17.install
+dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian/libgandiva18.install
 dev/tasks/linux-packages/apache-arrow/debian/libparquet-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian/libparquet17.install
+dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian/libparquet18.install
 dev/tasks/linux-packages/apache-arrow/debian/libplasma-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib-dev.install
 dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib-doc.doc-base
 dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib-doc.install
 dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib-doc.links
-dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib17.install
-dev/tasks/linux-packages/apache-arrow/debian/libplasma17.install
+dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib18.install
+dev/tasks/linux-packages/apache-arrow/debian/libplasma18.install
 dev/tasks/linux-packages/apache-arrow/debian/patches/series
 dev/tasks/linux-packages/apache-arrow/debian/plasma-store-server.install
 dev/tasks/linux-packages/apache-arrow/debian/rules
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
index 9be6728..e97fdfa 100644
--- a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
+++ b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
@@ -33,7 +33,7 @@ Build-Depends-Indep: libglib2.0-doc
 Standards-Version: 3.9.7
 Homepage: https://arrow.apache.org/
 
-Package: libarrow17
+Package: libarrow18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -45,7 +45,7 @@ Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files.
 
-Package: libarrow-cuda17
+Package: libarrow-cuda18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -53,12 +53,12 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for CUDA support.
 
-Package: libarrow-dataset17
+Package: libarrow-dataset18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -66,12 +66,12 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for Datasets module.
 
-Package: libarrow-python17
+Package: libarrow-python18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -79,7 +79,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version}),
+  libarrow18 (= ${binary:Version}),
   python3,
   python3-numpy
 Description: Apache Arrow is a data processing library for analysis
@@ -92,7 +92,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files.
@@ -104,7 +104,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-cuda18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for CUDA support.
@@ -116,7 +116,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-dataset17 (= ${binary:Version})
+  libarrow-dataset18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for Datasets module.
@@ -128,12 +128,12 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-python17 (= ${binary:Version})
+  libarrow-python18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for Python support.
 
-Package: libgandiva17
+Package: libgandiva18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -141,7 +141,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
@@ -154,13 +154,13 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libgandiva17 (= ${binary:Version})
+  libgandiva18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
  This package provides C++ header files.
 
-Package: libplasma17
+Package: libplasma18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -168,7 +168,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-cuda18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides C++ library files to connect plasma-store-server.
@@ -180,7 +180,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libplasma17 (= ${binary:Version})
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides plasma-store-server.
@@ -192,12 +192,12 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-cuda-dev (= ${binary:Version}),
-  libplasma17 (= ${binary:Version})
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides C++ header files.
 
-Package: libparquet17
+Package: libparquet18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -216,12 +216,12 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libparquet17 (= ${binary:Version})
+  libparquet18 (= ${binary:Version})
 Description: Apache Parquet is a columnar storage format
  .
  This package provides C++ header files.
 
-Package: libarrow-glib17
+Package: libarrow-glib18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -229,7 +229,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based library files.
@@ -253,7 +253,7 @@ Depends:
   ${misc:Depends},
   libglib2.0-dev,
   libarrow-dev (= ${binary:Version}),
-  libarrow-glib17 (= ${binary:Version}),
+  libarrow-glib18 (= ${binary:Version}),
   gir1.2-arrow-1.0 (= ${binary:Version})
 Suggests: libarrow-glib-doc
 Description: Apache Arrow is a data processing library for analysis
@@ -271,7 +271,7 @@ Description: Apache Arrow is a data processing library for analysis
  .
  This package provides documentations.
 
-Package: libarrow-cuda-glib17
+Package: libarrow-cuda-glib18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -279,8 +279,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libarrow-cuda18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based library files for CUDA support.
@@ -304,13 +304,13 @@ Depends:
   ${misc:Depends},
   libarrow-cuda-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
-  libarrow-cuda-glib17 (= ${binary:Version}),
+  libarrow-cuda-glib18 (= ${binary:Version}),
   gir1.2-arrow-cuda-1.0 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based header files for CUDA support.
 
-Package: libgandiva-glib17
+Package: libgandiva-glib18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -318,8 +318,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libgandiva17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libgandiva18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
@@ -345,7 +345,7 @@ Depends:
   ${misc:Depends},
   libgandiva-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
-  libgandiva-glib17 (= ${binary:Version}),
+  libgandiva-glib18 (= ${binary:Version}),
   gir1.2-gandiva-1.0 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
@@ -364,7 +364,7 @@ Description: Gandiva is a toolset for compiling and evaluating expressions
  .
  This package provides documentations.
 
-Package: libplasma-glib17
+Package: libplasma-glib18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -372,8 +372,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-cuda-glib17 (= ${binary:Version}),
-  libplasma17 (= ${binary:Version})
+  libarrow-cuda-glib18 (= ${binary:Version}),
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides GLib based library files to connect plasma-store-server.
@@ -397,7 +397,7 @@ Depends:
   ${misc:Depends},
   libplasma-dev (= ${binary:Version}),
   libarrow-cuda-glib-dev (= ${binary:Version}),
-  libplasma-glib17 (= ${binary:Version}),
+  libplasma-glib18 (= ${binary:Version}),
   gir1.2-plasma-1.0 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
@@ -414,7 +414,7 @@ Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides documentations.
 
-Package: libparquet-glib17
+Package: libparquet-glib18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -422,8 +422,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libparquet17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libparquet18 (= ${binary:Version})
 Description: Apache Parquet is a columnar storage format
  .
  This package provides GLib based library files.
@@ -447,7 +447,7 @@ Depends:
   ${misc:Depends},
   libarrow-glib-dev (= ${binary:Version}),
   libparquet-dev (= ${binary:Version}),
-  libparquet-glib17 (= ${binary:Version}),
+  libparquet-glib18 (= ${binary:Version}),
   gir1.2-parquet-1.0 (= ${binary:Version})
 Suggests: libparquet-glib-doc
 Description: Apache Parquet is a columnar storage format
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-python17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-python17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libgandiva17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libgandiva17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libparquet17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libparquet17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libplasma17.install b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libplasma17.install
rename to dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/control b/dev/tasks/linux-packages/apache-arrow/debian/control
index 84f3d57..7598ae8 100644
--- a/dev/tasks/linux-packages/apache-arrow/debian/control
+++ b/dev/tasks/linux-packages/apache-arrow/debian/control
@@ -32,7 +32,7 @@ Build-Depends-Indep: libglib2.0-doc
 Standards-Version: 3.9.8
 Homepage: https://arrow.apache.org/
 
-Package: libarrow17
+Package: libarrow18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -44,7 +44,7 @@ Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files.
 
-Package: libarrow-cuda17
+Package: libarrow-cuda18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -52,12 +52,12 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for CUDA support.
 
-Package: libarrow-dataset17
+Package: libarrow-dataset18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -65,13 +65,13 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version}),
-  libparquet17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version}),
+  libparquet18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for Datasets module.
 
-Package: libarrow-flight17
+Package: libarrow-flight18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -79,12 +79,12 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for Flight RPC system.
 
-Package: libarrow-python17
+Package: libarrow-python18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -92,14 +92,14 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version}),
+  libarrow18 (= ${binary:Version}),
   python3,
   python3-numpy
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for Python support.
 
-Package: libarrow-python-flight17
+Package: libarrow-python-flight18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -107,8 +107,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-flight17 (= ${binary:Version}),
-  libarrow-python17 (= ${binary:Version})
+  libarrow-flight18 (= ${binary:Version}),
+  libarrow-python18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ library files for Flight and Python support.
@@ -119,7 +119,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files.
@@ -131,7 +131,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-cuda18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for CUDA support.
@@ -143,7 +143,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-dataset17 (= ${binary:Version}),
+  libarrow-dataset18 (= ${binary:Version}),
   libparquet-dev (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
@@ -156,7 +156,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-flight17 (= ${binary:Version})
+  libarrow-flight18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for Flight RPC system.
@@ -168,7 +168,7 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libarrow-python17 (= ${binary:Version})
+  libarrow-python18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for Python support.
@@ -181,12 +181,12 @@ Depends:
   ${misc:Depends},
   libarrow-flight-dev (= ${binary:Version}),
   libarrow-python-dev (= ${binary:Version}),
-  libarrow-python-flight17 (= ${binary:Version})
+  libarrow-python-flight18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides C++ header files for Flight and Python support.
 
-Package: libgandiva17
+Package: libgandiva18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -194,7 +194,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
@@ -207,13 +207,13 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libgandiva17 (= ${binary:Version})
+  libgandiva18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
  This package provides C++ header files.
 
-Package: libplasma17
+Package: libplasma18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -221,7 +221,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-cuda18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides C++ library files to connect plasma-store-server.
@@ -233,7 +233,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libplasma17 (= ${binary:Version})
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides plasma-store-server.
@@ -245,12 +245,12 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-cuda-dev (= ${binary:Version}),
-  libplasma17 (= ${binary:Version})
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides C++ header files.
 
-Package: libparquet17
+Package: libparquet18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -269,12 +269,12 @@ Multi-Arch: same
 Depends:
   ${misc:Depends},
   libarrow-dev (= ${binary:Version}),
-  libparquet17 (= ${binary:Version})
+  libparquet18 (= ${binary:Version})
 Description: Apache Parquet is a columnar storage format
  .
  This package provides C++ header files.
 
-Package: libarrow-glib17
+Package: libarrow-glib18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -282,7 +282,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow17 (= ${binary:Version})
+  libarrow18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based library files.
@@ -306,7 +306,7 @@ Depends:
   ${misc:Depends},
   libglib2.0-dev,
   libarrow-dev (= ${binary:Version}),
-  libarrow-glib17 (= ${binary:Version}),
+  libarrow-glib18 (= ${binary:Version}),
   gir1.2-arrow-1.0 (= ${binary:Version})
 Suggests: libarrow-glib-doc
 Description: Apache Arrow is a data processing library for analysis
@@ -324,7 +324,7 @@ Description: Apache Arrow is a data processing library for analysis
  .
  This package provides documentations.
 
-Package: libarrow-cuda-glib17
+Package: libarrow-cuda-glib18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -332,8 +332,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libarrow-cuda17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libarrow-cuda18 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based library files for CUDA support.
@@ -357,13 +357,13 @@ Depends:
   ${misc:Depends},
   libarrow-cuda-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
-  libarrow-cuda-glib17 (= ${binary:Version}),
+  libarrow-cuda-glib18 (= ${binary:Version}),
   gir1.2-arrow-cuda-1.0 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
  This package provides GLib based header files for CUDA support.
 
-Package: libgandiva-glib17
+Package: libgandiva-glib18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -371,8 +371,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libgandiva17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libgandiva18 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
  .
@@ -398,7 +398,7 @@ Depends:
   ${misc:Depends},
   libgandiva-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
-  libgandiva-glib17 (= ${binary:Version}),
+  libgandiva-glib18 (= ${binary:Version}),
   gir1.2-gandiva-1.0 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
@@ -417,7 +417,7 @@ Description: Gandiva is a toolset for compiling and evaluating expressions
  .
  This package provides documentations.
 
-Package: libplasma-glib17
+Package: libplasma-glib18
 Section: libs
 Architecture: i386 amd64
 Multi-Arch: same
@@ -425,8 +425,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-cuda-glib17 (= ${binary:Version}),
-  libplasma17 (= ${binary:Version})
+  libarrow-cuda-glib18 (= ${binary:Version}),
+  libplasma18 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides GLib based library files to connect plasma-store-server.
@@ -450,7 +450,7 @@ Depends:
   ${misc:Depends},
   libplasma-dev (= ${binary:Version}),
   libarrow-cuda-glib-dev (= ${binary:Version}),
-  libplasma-glib17 (= ${binary:Version}),
+  libplasma-glib18 (= ${binary:Version}),
   gir1.2-plasma-1.0 (= ${binary:Version})
 Description: Plasma is an in-memory object store and cache for big data.
  .
@@ -467,7 +467,7 @@ Description: Plasma is an in-memory object store and cache for big data.
  .
  This package provides documentations.
 
-Package: libparquet-glib17
+Package: libparquet-glib18
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -475,8 +475,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
-  libarrow-glib17 (= ${binary:Version}),
-  libparquet17 (= ${binary:Version})
+  libarrow-glib18 (= ${binary:Version}),
+  libparquet18 (= ${binary:Version})
 Description: Apache Parquet is a columnar storage format
  .
  This package provides GLib based library files.
@@ -500,7 +500,7 @@ Depends:
   ${misc:Depends},
   libarrow-glib-dev (= ${binary:Version}),
   libparquet-dev (= ${binary:Version}),
-  libparquet-glib17 (= ${binary:Version}),
+  libparquet-glib18 (= ${binary:Version}),
   gir1.2-parquet-1.0 (= ${binary:Version})
 Suggests: libparquet-glib-doc
 Description: Apache Parquet is a columnar storage format
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-cuda17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-cuda18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-dataset17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-dataset18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-flight18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-python-flight18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-python18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow-python17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow-python18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow17.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libarrow17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libarrow18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libgandiva-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva17.install b/dev/tasks/linux-packages/apache-arrow/debian/libgandiva18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libgandiva17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libgandiva18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libparquet-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet17.install b/dev/tasks/linux-packages/apache-arrow/debian/libparquet18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libparquet17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libparquet18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib17.install b/dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma-glib17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libplasma-glib18.install
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma17.install b/dev/tasks/linux-packages/apache-arrow/debian/libplasma18.install
similarity index 100%
rename from dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/libplasma17.install
rename to dev/tasks/linux-packages/apache-arrow/debian/libplasma18.install
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index a03a44d..16b9c4c 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -497,46 +497,46 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -564,34 +564,34 @@ tasks:
       - gir1.2-parquet-1.0_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
 
   debian-buster-amd64:
     ci: github
@@ -620,46 +620,46 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -687,34 +687,34 @@ tasks:
       - gir1.2-parquet-1.0_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
 
   ubuntu-xenial-amd64:
     ci: github
@@ -743,32 +743,32 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -798,27 +798,27 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -849,35 +849,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -908,35 +908,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -967,35 +967,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -1026,35 +1026,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -1085,35 +1085,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 
@@ -1144,35 +1144,35 @@ tasks:
       - libarrow-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-glib17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-glib18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-cuda-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-cuda17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-cuda18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-dataset-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-dataset17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-dataset18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-flight-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-flight17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-flight18_{no_rc_version}-1_[a-z0-9]+.deb
       - libarrow-python-dev_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow-python17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libarrow17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow-python18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libarrow18_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libgandiva-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libgandiva17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libgandiva18_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libparquet-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libparquet17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libparquet18_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-dev_{no_rc_version}-1_[a-z0-9]+.deb
       - libplasma-glib-doc_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma-glib17_{no_rc_version}-1_[a-z0-9]+.deb
-      - libplasma17_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma-glib18_{no_rc_version}-1_[a-z0-9]+.deb
+      - libplasma18_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server-dbgsym_{no_rc_version}-1_[a-z0-9]+.deb
       - plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
 


[arrow] 27/28: ARROW-8488: [R] Remove VALUE_OR_STOP and STOP_IF_NOT_OK macros

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a6290a88ec34a3378037c05b45a4f64ab91747d8
Author: François Saint-Jacques <fs...@gmail.com>
AuthorDate: Mon Apr 20 09:24:12 2020 -0400

    ARROW-8488: [R] Remove VALUE_OR_STOP and STOP_IF_NOT_OK macros
    
    Prefer templated functions over macro to align with the C++ style.
    
    Closes #6969 from fsaintjacques/ARROW-8488
    
    Authored-by: François Saint-Jacques <fs...@gmail.com>
    Signed-off-by: François Saint-Jacques <fs...@gmail.com>
---
 r/src/array.cpp             |  6 +++---
 r/src/array_from_vector.cpp | 32 ++++++++++++++++----------------
 r/src/array_to_vector.cpp   | 12 ++++++------
 r/src/arrow_types.h         | 20 ++++++--------------
 r/src/chunkedarray.cpp      |  4 ++--
 r/src/compression.cpp       |  6 +++---
 r/src/compute.cpp           | 30 +++++++++++++++---------------
 r/src/csv.cpp               |  8 ++++----
 r/src/dataset.cpp           | 42 ++++++++++++++++++++----------------------
 r/src/datatype.cpp          |  4 ++--
 r/src/feather.cpp           |  8 ++++----
 r/src/filesystem.cpp        | 32 ++++++++++++++++----------------
 r/src/io.cpp                | 44 ++++++++++++++++++++++----------------------
 r/src/json.cpp              |  4 ++--
 r/src/message.cpp           | 12 ++++++------
 r/src/parquet.cpp           |  2 +-
 r/src/py-to-r.cpp           | 17 ++++++++---------
 r/src/recordbatch.cpp       | 18 +++++++++---------
 r/src/recordbatchreader.cpp | 20 ++++++++++----------
 r/src/recordbatchwriter.cpp | 10 +++++-----
 r/src/schema.cpp            |  4 ++--
 r/src/table.cpp             | 12 ++++++------
 r/src/threadpool.cpp        |  2 +-
 23 files changed, 169 insertions(+), 180 deletions(-)

diff --git a/r/src/array.cpp b/r/src/array.cpp
index 6244674..f1c32ca 100644
--- a/r/src/array.cpp
+++ b/r/src/array.cpp
@@ -143,7 +143,7 @@ bool Array__RangeEquals(const std::shared_ptr<arrow::Array>& self,
 // [[arrow::export]]
 std::shared_ptr<arrow::Array> Array__View(const std::shared_ptr<arrow::Array>& array,
                                           const std::shared_ptr<arrow::DataType>& type) {
-  return VALUE_OR_STOP(array->View(type));
+  return ValueOrStop(array->View(type));
 }
 
 // [[arrow::export]]
@@ -164,7 +164,7 @@ LogicalVector Array__Mask(const std::shared_ptr<arrow::Array>& array) {
 
 // [[arrow::export]]
 void Array__Validate(const std::shared_ptr<arrow::Array>& array) {
-  STOP_IF_NOT_OK(array->Validate());
+  StopIfNotOk(array->Validate());
 }
 
 // [[arrow::export]]
@@ -194,7 +194,7 @@ std::shared_ptr<arrow::Array> StructArray__GetFieldByName(
 // [[arrow::export]]
 arrow::ArrayVector StructArray__Flatten(
     const std::shared_ptr<arrow::StructArray>& array) {
-  return VALUE_OR_STOP(array->Flatten());
+  return ValueOrStop(array->Flatten());
 }
 
 // [[arrow::export]]
diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp
index 35bfbae..49ebfed 100644
--- a/r/src/array_from_vector.cpp
+++ b/r/src/array_from_vector.cpp
@@ -203,13 +203,13 @@ struct VectorToArrayConverter {
 
   static std::shared_ptr<Array> Visit(SEXP x, const std::shared_ptr<DataType>& type) {
     std::unique_ptr<ArrayBuilder> builder;
-    STOP_IF_NOT_OK(MakeBuilder(arrow::default_memory_pool(), type, &builder));
+    StopIfNotOk(MakeBuilder(arrow::default_memory_pool(), type, &builder));
 
     VectorToArrayConverter converter{x, builder.get()};
-    STOP_IF_NOT_OK(arrow::VisitTypeInline(*type, &converter));
+    StopIfNotOk(arrow::VisitTypeInline(*type, &converter));
 
     std::shared_ptr<Array> result;
-    STOP_IF_NOT_OK(builder->Finish(&result));
+    StopIfNotOk(builder->Finish(&result));
     return result;
   }
 
@@ -228,7 +228,7 @@ std::shared_ptr<Array> MakeFactorArrayImpl(Rcpp::IntegerVector_ factor,
   auto n = factor.size();
 
   std::shared_ptr<Buffer> indices_buffer =
-      VALUE_OR_STOP(AllocateBuffer(n * sizeof(value_type)));
+      ValueOrStop(AllocateBuffer(n * sizeof(value_type)));
 
   std::vector<std::shared_ptr<Buffer>> buffers{nullptr, indices_buffer};
 
@@ -243,7 +243,7 @@ std::shared_ptr<Array> MakeFactorArrayImpl(Rcpp::IntegerVector_ factor,
 
   if (i < n) {
     // there are NA's so we need a null buffer
-    auto null_buffer = VALUE_OR_STOP(AllocateBuffer(BitUtil::BytesForBits(n)));
+    auto null_buffer = ValueOrStop(AllocateBuffer(BitUtil::BytesForBits(n)));
     internal::FirstTimeBitmapWriter null_bitmap_writer(null_buffer->mutable_data(), 0, n);
 
     // catch up
@@ -273,7 +273,7 @@ std::shared_ptr<Array> MakeFactorArrayImpl(Rcpp::IntegerVector_ factor,
   SEXP levels = Rf_getAttrib(factor, R_LevelsSymbol);
   auto dict = MakeStringArray(levels, utf8());
 
-  return VALUE_OR_STOP(DictionaryArray::FromArrays(type, array_indices, dict));
+  return ValueOrStop(DictionaryArray::FromArrays(type, array_indices, dict));
 }
 
 std::shared_ptr<Array> MakeFactorArray(Rcpp::IntegerVector_ factor,
@@ -1070,7 +1070,7 @@ std::shared_ptr<Array> MakeSimpleArray(SEXP x) {
 
   auto first_na = std::find_if(p_vec_start, p_vec_end, is_na<value_type>);
   if (first_na < p_vec_end) {
-    auto null_bitmap = VALUE_OR_STOP(AllocateBuffer(BitUtil::BytesForBits(n)));
+    auto null_bitmap = ValueOrStop(AllocateBuffer(BitUtil::BytesForBits(n)));
     internal::FirstTimeBitmapWriter bitmap_writer(null_bitmap->mutable_data(), 0, n);
 
     // first loop to clear all the bits before the first NA
@@ -1192,7 +1192,7 @@ std::shared_ptr<arrow::Array> Array__from_vector(
   // struct types
   if (type->id() == Type::STRUCT) {
     if (!type_inferred) {
-      STOP_IF_NOT_OK(arrow::r::CheckCompatibleStruct(x, type));
+      StopIfNotOk(arrow::r::CheckCompatibleStruct(x, type));
     }
 
     return arrow::r::MakeStructArray(x, type);
@@ -1200,17 +1200,17 @@ std::shared_ptr<arrow::Array> Array__from_vector(
 
   // general conversion with converter and builder
   std::unique_ptr<arrow::r::VectorConverter> converter;
-  STOP_IF_NOT_OK(arrow::r::GetConverter(type, &converter));
+  StopIfNotOk(arrow::r::GetConverter(type, &converter));
 
   // Create ArrayBuilder for type
   std::unique_ptr<arrow::ArrayBuilder> type_builder;
-  STOP_IF_NOT_OK(arrow::MakeBuilder(arrow::default_memory_pool(), type, &type_builder));
-  STOP_IF_NOT_OK(converter->Init(type_builder.get()));
+  StopIfNotOk(arrow::MakeBuilder(arrow::default_memory_pool(), type, &type_builder));
+  StopIfNotOk(converter->Init(type_builder.get()));
 
   // ingest R data and grab the result array
-  STOP_IF_NOT_OK(converter->Ingest(x));
+  StopIfNotOk(converter->Ingest(x));
   std::shared_ptr<arrow::Array> result;
-  STOP_IF_NOT_OK(converter->GetResult(&result));
+  StopIfNotOk(converter->GetResult(&result));
 
   return result;
 }
@@ -1261,8 +1261,8 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__from_list(Rcpp::List chunks,
   if (n == 0) {
     std::shared_ptr<arrow::Array> array;
     std::unique_ptr<arrow::ArrayBuilder> type_builder;
-    STOP_IF_NOT_OK(arrow::MakeBuilder(arrow::default_memory_pool(), type, &type_builder));
-    STOP_IF_NOT_OK(type_builder->Finish(&array));
+    StopIfNotOk(arrow::MakeBuilder(arrow::default_memory_pool(), type, &type_builder));
+    StopIfNotOk(type_builder->Finish(&array));
     vec.push_back(array);
   } else {
     // the first - might differ from the rest of the loop
@@ -1285,7 +1285,7 @@ std::shared_ptr<arrow::Array> DictionaryArray__FromArrays(
     const std::shared_ptr<arrow::DataType>& type,
     const std::shared_ptr<arrow::Array>& indices,
     const std::shared_ptr<arrow::Array>& dict) {
-  return VALUE_OR_STOP(arrow::DictionaryArray::FromArrays(type, indices, dict));
+  return ValueOrStop(arrow::DictionaryArray::FromArrays(type, indices, dict));
 }
 
 #endif
diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp
index 5aefaee..4f55610 100644
--- a/r/src/array_to_vector.cpp
+++ b/r/src/array_to_vector.cpp
@@ -129,7 +129,7 @@ Status SomeNull_Ingest(SEXP data, R_xlen_t start, R_xlen_t n,
 SEXP ArrayVector__as_vector(R_xlen_t n, const ArrayVector& arrays) {
   auto converter = Converter::Make(arrays);
   Shield<SEXP> data(converter->Allocate(n));
-  STOP_IF_NOT_OK(converter->IngestSerial(data));
+  StopIfNotOk(converter->IngestSerial(data));
   return data;
 }
 
@@ -387,7 +387,7 @@ class Converter_Struct : public Converter {
   Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const {
     int nf = converters.size();
     for (int i = 0; i < nf; i++) {
-      STOP_IF_NOT_OK(converters[i]->Ingest_all_nulls(VECTOR_ELT(data, i), start, n));
+      StopIfNotOk(converters[i]->Ingest_all_nulls(VECTOR_ELT(data, i), start, n));
     }
     return Status::OK();
   }
@@ -397,9 +397,9 @@ class Converter_Struct : public Converter {
     auto struct_array = internal::checked_cast<arrow::StructArray*>(array.get());
     int nf = converters.size();
     // Flatten() deals with merging of nulls
-    auto arrays = VALUE_OR_STOP(struct_array->Flatten(default_memory_pool()));
+    auto arrays = ValueOrStop(struct_array->Flatten(default_memory_pool()));
     for (int i = 0; i < nf; i++) {
-      STOP_IF_NOT_OK(
+      StopIfNotOk(
           converters[i]->Ingest_some_nulls(VECTOR_ELT(data, i), arrays[i], start, n));
     }
 
@@ -760,7 +760,7 @@ Rcpp::List to_dataframe_serial(
 
   for (int i = 0; i < nc; i++) {
     SEXP column = tbl[i] = converters[i]->Allocate(nr);
-    STOP_IF_NOT_OK(converters[i]->IngestSerial(column));
+    StopIfNotOk(converters[i]->IngestSerial(column));
   }
   tbl.attr("names") = names;
   tbl.attr("class") = Rcpp::CharacterVector::create("tbl_df", "tbl", "data.frame");
@@ -801,7 +801,7 @@ Rcpp::List to_dataframe_parallel(
   // wait for the ingestion to be finished
   status &= tg->Finish();
 
-  STOP_IF_NOT_OK(status);
+  StopIfNotOk(status);
 
   tbl.attr("names") = names;
   tbl.attr("class") = Rcpp::CharacterVector::create("tbl_df", "tbl", "data.frame");
diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h
index bcc1869..5c2b05a 100644
--- a/r/src/arrow_types.h
+++ b/r/src/arrow_types.h
@@ -43,14 +43,6 @@ struct data {
 }  // namespace r
 }  // namespace arrow
 
-#define STOP_IF_NOT(TEST, MSG)    \
-  do {                            \
-    if (!(TEST)) Rcpp::stop(MSG); \
-  } while (0)
-
-#define STOP_IF_NOT_OK(status) StopIfNotOk(status)
-#define VALUE_OR_STOP(result) ValueOrStop(result)
-
 template <typename T>
 struct NoDelete {
   inline void operator()(T* ptr) {}
@@ -244,18 +236,18 @@ namespace fs = ::arrow::fs;
 
 namespace arrow {
 
-template <typename R>
-auto ValueOrStop(R&& result) -> decltype(std::forward<R>(result).ValueOrDie()) {
-  STOP_IF_NOT_OK(result.status());
-  return std::forward<R>(result).ValueOrDie();
-}
-
 static inline void StopIfNotOk(const Status& status) {
   if (!(status.ok())) {
     Rcpp::stop(status.ToString());
   }
 }
 
+template <typename R>
+auto ValueOrStop(R&& result) -> decltype(std::forward<R>(result).ValueOrDie()) {
+  StopIfNotOk(result.status());
+  return std::forward<R>(result).ValueOrDie();
+}
+
 namespace r {
 
 Status count_fields(SEXP lst, int* out);
diff --git a/r/src/chunkedarray.cpp b/r/src/chunkedarray.cpp
index 749dc2d..5aeea8a 100644
--- a/r/src/chunkedarray.cpp
+++ b/r/src/chunkedarray.cpp
@@ -74,12 +74,12 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__Slice2(
 std::shared_ptr<arrow::ChunkedArray> ChunkedArray__View(
     const std::shared_ptr<arrow::ChunkedArray>& array,
     const std::shared_ptr<arrow::DataType>& type) {
-  return VALUE_OR_STOP(array->View(type));
+  return ValueOrStop(array->View(type));
 }
 
 // [[arrow::export]]
 void ChunkedArray__Validate(const std::shared_ptr<arrow::ChunkedArray>& chunked_array) {
-  STOP_IF_NOT_OK(chunked_array->Validate());
+  StopIfNotOk(chunked_array->Validate());
 }
 
 // [[arrow::export]]
diff --git a/r/src/compression.cpp b/r/src/compression.cpp
index 63beed8..cef03f1 100644
--- a/r/src/compression.cpp
+++ b/r/src/compression.cpp
@@ -22,7 +22,7 @@
 // [[arrow::export]]
 std::unique_ptr<arrow::util::Codec> util___Codec__Create(arrow::Compression::type codec,
                                                          int compression_level) {
-  return VALUE_OR_STOP(arrow::util::Codec::Create(codec, compression_level));
+  return ValueOrStop(arrow::util::Codec::Create(codec, compression_level));
 }
 
 // [[arrow::export]]
@@ -39,14 +39,14 @@ bool util___Codec__IsAvailable(arrow::Compression::type codec) {
 std::shared_ptr<arrow::io::CompressedOutputStream> io___CompressedOutputStream__Make(
     const std::unique_ptr<arrow::util::Codec>& codec,
     const std::shared_ptr<arrow::io::OutputStream>& raw) {
-  return VALUE_OR_STOP(arrow::io::CompressedOutputStream::Make(codec.get(), raw));
+  return ValueOrStop(arrow::io::CompressedOutputStream::Make(codec.get(), raw));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::CompressedInputStream> io___CompressedInputStream__Make(
     const std::unique_ptr<arrow::util::Codec>& codec,
     const std::shared_ptr<arrow::io::InputStream>& raw) {
-  return VALUE_OR_STOP(arrow::io::CompressedInputStream::Make(codec.get(), raw));
+  return ValueOrStop(arrow::io::CompressedInputStream::Make(codec.get(), raw));
 }
 
 #endif
diff --git a/r/src/compute.cpp b/r/src/compute.cpp
index 212b27c..bf9935a 100644
--- a/r/src/compute.cpp
+++ b/r/src/compute.cpp
@@ -36,7 +36,7 @@ std::shared_ptr<arrow::Array> Array__cast(
     const std::shared_ptr<arrow::compute::CastOptions>& options) {
   std::shared_ptr<arrow::Array> out;
   arrow::compute::FunctionContext context;
-  STOP_IF_NOT_OK(arrow::compute::Cast(&context, *array, target_type, *options, &out));
+  StopIfNotOk(arrow::compute::Cast(&context, *array, target_type, *options, &out));
   return out;
 }
 
@@ -48,7 +48,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__cast(
   arrow::compute::Datum value(chunked_array);
   arrow::compute::Datum out;
   arrow::compute::FunctionContext context;
-  STOP_IF_NOT_OK(arrow::compute::Cast(&context, value, target_type, *options, &out));
+  StopIfNotOk(arrow::compute::Cast(&context, value, target_type, *options, &out));
   return out.chunked_array();
 }
 
@@ -88,7 +88,7 @@ std::shared_ptr<arrow::Array> Array__Take(const std::shared_ptr<arrow::Array>& v
   std::shared_ptr<arrow::Array> out;
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *values, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *values, *indices, options, &out));
   return out;
 }
 
@@ -100,7 +100,7 @@ std::shared_ptr<arrow::ChunkedArray> Array__TakeChunked(
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
 
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *values, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *values, *indices, options, &out));
   return out;
 }
 
@@ -111,7 +111,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatch__Take(
   std::shared_ptr<arrow::RecordBatch> out;
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *batch, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *batch, *indices, options, &out));
   return out;
 }
 
@@ -123,7 +123,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__Take(
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
 
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *values, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *values, *indices, options, &out));
   return out;
 }
 
@@ -135,7 +135,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__TakeChunked(
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
 
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *values, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *values, *indices, options, &out));
   return out;
 }
 
@@ -146,7 +146,7 @@ std::shared_ptr<arrow::Table> Table__Take(const std::shared_ptr<arrow::Table>& t
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
 
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *table, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *table, *indices, options, &out));
   return out;
 }
 
@@ -158,7 +158,7 @@ std::shared_ptr<arrow::Table> Table__TakeChunked(
   arrow::compute::FunctionContext context;
   arrow::compute::TakeOptions options;
 
-  STOP_IF_NOT_OK(arrow::compute::Take(&context, *table, *indices, options, &out));
+  StopIfNotOk(arrow::compute::Take(&context, *table, *indices, options, &out));
   return out;
 }
 
@@ -173,7 +173,7 @@ std::shared_ptr<arrow::Array> Array__Filter(const std::shared_ptr<arrow::Array>&
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, values, filter, {}, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, values, filter, {}, &out));
   return out.make_array();
 }
 
@@ -188,7 +188,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatch__Filter(
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, batch, filter, options, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, batch, filter, options, &out));
   return out.record_batch();
 }
 
@@ -203,7 +203,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__Filter(
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, values, filter, options, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, values, filter, options, &out));
   return out.chunked_array();
 }
 
@@ -218,7 +218,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__FilterChunked(
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, values, filter, options, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, values, filter, options, &out));
   return out.chunked_array();
 }
 
@@ -233,7 +233,7 @@ std::shared_ptr<arrow::Table> Table__Filter(const std::shared_ptr<arrow::Table>&
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, table, filter, options, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, table, filter, options, &out));
   std::shared_ptr<arrow::Table> tab = out.table();
   if (tab->num_rows() == 0) {
     // Slight hack: if there are no rows in the result, instead do a 0-length
@@ -255,7 +255,7 @@ std::shared_ptr<arrow::Table> Table__FilterChunked(
   if (keep_na) {
     options.null_selection_behavior = arrow::compute::FilterOptions::EMIT_NULL;
   }
-  STOP_IF_NOT_OK(arrow::compute::Filter(&context, table, filter, options, &out));
+  StopIfNotOk(arrow::compute::Filter(&context, table, filter, options, &out));
   std::shared_ptr<arrow::Table> tab = out.table();
   if (tab->num_rows() == 0) {
     // Slight hack: if there are no rows in the result, instead do a 0-length
diff --git a/r/src/csv.cpp b/r/src/csv.cpp
index 9c71ea6..a4432eb 100644
--- a/r/src/csv.cpp
+++ b/r/src/csv.cpp
@@ -78,15 +78,15 @@ std::shared_ptr<arrow::csv::TableReader> csv___TableReader__Make(
     const std::shared_ptr<arrow::csv::ReadOptions>& read_options,
     const std::shared_ptr<arrow::csv::ParseOptions>& parse_options,
     const std::shared_ptr<arrow::csv::ConvertOptions>& convert_options) {
-  return VALUE_OR_STOP(arrow::csv::TableReader::Make(arrow::default_memory_pool(), input,
-                                                     *read_options, *parse_options,
-                                                     *convert_options));
+  return ValueOrStop(arrow::csv::TableReader::Make(arrow::default_memory_pool(), input,
+                                                   *read_options, *parse_options,
+                                                   *convert_options));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Table> csv___TableReader__Read(
     const std::shared_ptr<arrow::csv::TableReader>& table_reader) {
-  return VALUE_OR_STOP(table_reader->Read());
+  return ValueOrStop(table_reader->Read());
 }
 
 #endif
diff --git a/r/src/dataset.cpp b/r/src/dataset.cpp
index e92ac03..d5c9d83 100644
--- a/r/src/dataset.cpp
+++ b/r/src/dataset.cpp
@@ -27,7 +27,7 @@ using Rcpp::String;
 // [[arrow::export]]
 std::shared_ptr<ds::ScannerBuilder> dataset___Dataset__NewScan(
     const std::shared_ptr<ds::Dataset>& ds) {
-  return VALUE_OR_STOP(ds->NewScan());
+  return ValueOrStop(ds->NewScan());
 }
 
 // [[arrow::export]]
@@ -45,13 +45,13 @@ std::string dataset___Dataset__type_name(const std::shared_ptr<ds::Dataset>& dat
 std::shared_ptr<ds::Dataset> dataset___Dataset__ReplaceSchema(
     const std::shared_ptr<ds::Dataset>& dataset,
     const std::shared_ptr<arrow::Schema>& schm) {
-  return VALUE_OR_STOP(dataset->ReplaceSchema(schm));
+  return ValueOrStop(dataset->ReplaceSchema(schm));
 }
 
 // [[arrow::export]]
 std::shared_ptr<ds::UnionDataset> dataset___UnionDataset__create(
     const ds::DatasetVector& datasets, const std::shared_ptr<arrow::Schema>& schm) {
-  return VALUE_OR_STOP(ds::UnionDataset::Make(schm, datasets));
+  return ValueOrStop(ds::UnionDataset::Make(schm, datasets));
 }
 
 // [[arrow::export]]
@@ -81,14 +81,14 @@ std::shared_ptr<ds::Dataset> dataset___DatasetFactory__Finish1(
   if (unify_schemas) {
     opts.inspect_options.fragments = ds::InspectOptions::kInspectAllFragments;
   }
-  return VALUE_OR_STOP(factory->Finish(opts));
+  return ValueOrStop(factory->Finish(opts));
 }
 
 // [[arrow::export]]
 std::shared_ptr<ds::Dataset> dataset___DatasetFactory__Finish2(
     const std::shared_ptr<ds::DatasetFactory>& factory,
     const std::shared_ptr<arrow::Schema>& schema) {
-  return VALUE_OR_STOP(factory->Finish(schema));
+  return ValueOrStop(factory->Finish(schema));
 }
 
 // [[arrow::export]]
@@ -98,13 +98,13 @@ std::shared_ptr<arrow::Schema> dataset___DatasetFactory__Inspect(
   if (unify_schemas) {
     opts.fragments = ds::InspectOptions::kInspectAllFragments;
   }
-  return VALUE_OR_STOP(factory->Inspect(opts));
+  return ValueOrStop(factory->Inspect(opts));
 }
 
 // [[arrow::export]]
 std::shared_ptr<ds::DatasetFactory> dataset___UnionDatasetFactory__Make(
     const std::vector<std::shared_ptr<ds::DatasetFactory>>& children) {
-  return VALUE_OR_STOP(ds::UnionDatasetFactory::Make(children));
+  return ValueOrStop(ds::UnionDatasetFactory::Make(children));
 }
 
 // [[arrow::export]]
@@ -119,8 +119,7 @@ std::shared_ptr<ds::DatasetFactory> dataset___FileSystemDatasetFactory__Make2(
     options.partitioning = partitioning;
   }
 
-  return VALUE_OR_STOP(
-      ds::FileSystemDatasetFactory::Make(fs, *selector, format, options));
+  return ValueOrStop(ds::FileSystemDatasetFactory::Make(fs, *selector, format, options));
 }
 
 // [[arrow::export]]
@@ -143,8 +142,7 @@ std::shared_ptr<ds::DatasetFactory> dataset___FileSystemDatasetFactory__Make3(
     options.partitioning = factory;
   }
 
-  return VALUE_OR_STOP(
-      ds::FileSystemDatasetFactory::Make(fs, *selector, format, options));
+  return ValueOrStop(ds::FileSystemDatasetFactory::Make(fs, *selector, format, options));
 }
 
 // FileFormat, ParquetFileFormat, IpcFileFormat
@@ -206,7 +204,7 @@ std::shared_ptr<ds::PartitioningFactory> dataset___HivePartitioning__MakeFactory
 // [[arrow::export]]
 void dataset___ScannerBuilder__Project(const std::shared_ptr<ds::ScannerBuilder>& sb,
                                        const std::vector<std::string>& cols) {
-  STOP_IF_NOT_OK(sb->Project(cols));
+  StopIfNotOk(sb->Project(cols));
 }
 
 // [[arrow::export]]
@@ -214,20 +212,20 @@ void dataset___ScannerBuilder__Filter(const std::shared_ptr<ds::ScannerBuilder>&
                                       const std::shared_ptr<ds::Expression>& expr) {
   // Expressions converted from R's expressions are typed with R's native type,
   // i.e. double, int64_t and bool.
-  auto cast_filter = VALUE_OR_STOP(InsertImplicitCasts(*expr, *sb->schema()));
-  STOP_IF_NOT_OK(sb->Filter(cast_filter));
+  auto cast_filter = ValueOrStop(InsertImplicitCasts(*expr, *sb->schema()));
+  StopIfNotOk(sb->Filter(cast_filter));
 }
 
 // [[arrow::export]]
 void dataset___ScannerBuilder__UseThreads(const std::shared_ptr<ds::ScannerBuilder>& sb,
                                           bool threads) {
-  STOP_IF_NOT_OK(sb->UseThreads(threads));
+  StopIfNotOk(sb->UseThreads(threads));
 }
 
 // [[arrow::export]]
 void dataset___ScannerBuilder__BatchSize(const std::shared_ptr<ds::ScannerBuilder>& sb,
                                          int64_t batch_size) {
-  STOP_IF_NOT_OK(sb->BatchSize(batch_size));
+  StopIfNotOk(sb->BatchSize(batch_size));
 }
 
 // [[arrow::export]]
@@ -239,24 +237,24 @@ std::shared_ptr<arrow::Schema> dataset___ScannerBuilder__schema(
 // [[arrow::export]]
 std::shared_ptr<ds::Scanner> dataset___ScannerBuilder__Finish(
     const std::shared_ptr<ds::ScannerBuilder>& sb) {
-  return VALUE_OR_STOP(sb->Finish());
+  return ValueOrStop(sb->Finish());
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Table> dataset___Scanner__ToTable(
     const std::shared_ptr<ds::Scanner>& scanner) {
-  return VALUE_OR_STOP(scanner->ToTable());
+  return ValueOrStop(scanner->ToTable());
 }
 
 // [[arrow::export]]
 std::vector<std::shared_ptr<ds::ScanTask>> dataset___Scanner__Scan(
     const std::shared_ptr<ds::Scanner>& scanner) {
-  auto it = VALUE_OR_STOP(scanner->Scan());
+  auto it = ValueOrStop(scanner->Scan());
   std::vector<std::shared_ptr<ds::ScanTask>> out;
   std::shared_ptr<ds::ScanTask> scan_task;
   // TODO(npr): can this iteration be parallelized?
   for (auto st : it) {
-    scan_task = VALUE_OR_STOP(st);
+    scan_task = ValueOrStop(st);
     out.push_back(scan_task);
   }
   return out;
@@ -266,11 +264,11 @@ std::vector<std::shared_ptr<ds::ScanTask>> dataset___Scanner__Scan(
 std::vector<std::shared_ptr<arrow::RecordBatch>> dataset___ScanTask__get_batches(
     const std::shared_ptr<ds::ScanTask>& scan_task) {
   arrow::RecordBatchIterator rbi;
-  rbi = VALUE_OR_STOP(scan_task->Execute());
+  rbi = ValueOrStop(scan_task->Execute());
   std::vector<std::shared_ptr<arrow::RecordBatch>> out;
   std::shared_ptr<arrow::RecordBatch> batch;
   for (auto b : rbi) {
-    batch = VALUE_OR_STOP(b);
+    batch = ValueOrStop(b);
     out.push_back(batch);
   }
   return out;
diff --git a/r/src/datatype.cpp b/r/src/datatype.cpp
index bad97ea..87b3c96 100644
--- a/r/src/datatype.cpp
+++ b/r/src/datatype.cpp
@@ -89,7 +89,7 @@ std::shared_ptr<arrow::DataType> Null__initialize() { return arrow::null(); }
 std::shared_ptr<arrow::DataType> Decimal128Type__initialize(int32_t precision,
                                                             int32_t scale) {
   // Use the builder that validates inputs
-  return VALUE_OR_STOP(arrow::Decimal128Type::Make(precision, scale));
+  return ValueOrStop(arrow::Decimal128Type::Make(precision, scale));
 }
 
 // [[arrow::export]]
@@ -216,7 +216,7 @@ arrow::TimeUnit::type TimestampType__unit(
 std::shared_ptr<arrow::DataType> DictionaryType__initialize(
     const std::shared_ptr<arrow::DataType>& index_type,
     const std::shared_ptr<arrow::DataType>& value_type, bool ordered) {
-  return VALUE_OR_STOP(arrow::DictionaryType::Make(index_type, value_type, ordered));
+  return ValueOrStop(arrow::DictionaryType::Make(index_type, value_type, ordered));
 }
 
 // [[arrow::export]]
diff --git a/r/src/feather.cpp b/r/src/feather.cpp
index 7ab7360..f60f8b5 100644
--- a/r/src/feather.cpp
+++ b/r/src/feather.cpp
@@ -33,7 +33,7 @@ void ipc___WriteFeather__Table(const std::shared_ptr<arrow::io::OutputStream>& s
   if (compression_level != -1) {
     properties.compression_level = compression_level;
   }
-  STOP_IF_NOT_OK(arrow::ipc::feather::WriteTable(*table, stream.get(), properties));
+  StopIfNotOk(arrow::ipc::feather::WriteTable(*table, stream.get(), properties));
 }
 
 // ----------- Reader
@@ -56,11 +56,11 @@ std::shared_ptr<arrow::Table> ipc___feather___Reader__Read(
       for (R_xlen_t i = 0; i < n; i++) {
         names[i] = CHAR(STRING_ELT(columns, i));
       }
-      STOP_IF_NOT_OK(reader->Read(names, &table));
+      StopIfNotOk(reader->Read(names, &table));
       break;
     }
     case NILSXP:
-      STOP_IF_NOT_OK(reader->Read(&table));
+      StopIfNotOk(reader->Read(&table));
       break;
     default:
       Rcpp::stop("incompatible column specification");
@@ -73,7 +73,7 @@ std::shared_ptr<arrow::Table> ipc___feather___Reader__Read(
 // [[arrow::export]]
 std::shared_ptr<arrow::ipc::feather::Reader> ipc___feather___Reader__Open(
     const std::shared_ptr<arrow::io::RandomAccessFile>& stream) {
-  return VALUE_OR_STOP(arrow::ipc::feather::Reader::Open(stream));
+  return ValueOrStop(arrow::ipc::feather::Reader::Open(stream));
 }
 
 // [[arrow::export]]
diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp
index 54f2491..ce69332 100644
--- a/r/src/filesystem.cpp
+++ b/r/src/filesystem.cpp
@@ -120,7 +120,7 @@ std::vector<std::shared_ptr<T>> shared_ptr_vector(const std::vector<T>& vec) {
 std::vector<std::shared_ptr<fs::FileInfo>> fs___FileSystem__GetTargetInfos_Paths(
     const std::shared_ptr<fs::FileSystem>& file_system,
     const std::vector<std::string>& paths) {
-  auto results = VALUE_OR_STOP(file_system->GetFileInfo(paths));
+  auto results = ValueOrStop(file_system->GetFileInfo(paths));
   return shared_ptr_vector(results);
 }
 
@@ -128,74 +128,74 @@ std::vector<std::shared_ptr<fs::FileInfo>> fs___FileSystem__GetTargetInfos_Paths
 std::vector<std::shared_ptr<fs::FileInfo>> fs___FileSystem__GetTargetInfos_FileSelector(
     const std::shared_ptr<fs::FileSystem>& file_system,
     const std::shared_ptr<fs::FileSelector>& selector) {
-  auto results = VALUE_OR_STOP(file_system->GetFileInfo(*selector));
+  auto results = ValueOrStop(file_system->GetFileInfo(*selector));
   return shared_ptr_vector(results);
 }
 
 // [[arrow::export]]
 void fs___FileSystem__CreateDir(const std::shared_ptr<fs::FileSystem>& file_system,
                                 const std::string& path, bool recursive) {
-  STOP_IF_NOT_OK(file_system->CreateDir(path, recursive));
+  StopIfNotOk(file_system->CreateDir(path, recursive));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__DeleteDir(const std::shared_ptr<fs::FileSystem>& file_system,
                                 const std::string& path) {
-  STOP_IF_NOT_OK(file_system->DeleteDir(path));
+  StopIfNotOk(file_system->DeleteDir(path));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__DeleteDirContents(
     const std::shared_ptr<fs::FileSystem>& file_system, const std::string& path) {
-  STOP_IF_NOT_OK(file_system->DeleteDirContents(path));
+  StopIfNotOk(file_system->DeleteDirContents(path));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__DeleteFile(const std::shared_ptr<fs::FileSystem>& file_system,
                                  const std::string& path) {
-  STOP_IF_NOT_OK(file_system->DeleteFile(path));
+  StopIfNotOk(file_system->DeleteFile(path));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__DeleteFiles(const std::shared_ptr<fs::FileSystem>& file_system,
                                   const std::vector<std::string>& paths) {
-  STOP_IF_NOT_OK(file_system->DeleteFiles(paths));
+  StopIfNotOk(file_system->DeleteFiles(paths));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__Move(const std::shared_ptr<fs::FileSystem>& file_system,
                            const std::string& src, const std::string& dest) {
-  STOP_IF_NOT_OK(file_system->Move(src, dest));
+  StopIfNotOk(file_system->Move(src, dest));
 }
 
 // [[arrow::export]]
 void fs___FileSystem__CopyFile(const std::shared_ptr<fs::FileSystem>& file_system,
                                const std::string& src, const std::string& dest) {
-  STOP_IF_NOT_OK(file_system->CopyFile(src, dest));
+  StopIfNotOk(file_system->CopyFile(src, dest));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::InputStream> fs___FileSystem__OpenInputStream(
     const std::shared_ptr<fs::FileSystem>& file_system, const std::string& path) {
-  return VALUE_OR_STOP(file_system->OpenInputStream(path));
+  return ValueOrStop(file_system->OpenInputStream(path));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::RandomAccessFile> fs___FileSystem__OpenInputFile(
     const std::shared_ptr<fs::FileSystem>& file_system, const std::string& path) {
-  return VALUE_OR_STOP(file_system->OpenInputFile(path));
+  return ValueOrStop(file_system->OpenInputFile(path));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::OutputStream> fs___FileSystem__OpenOutputStream(
     const std::shared_ptr<fs::FileSystem>& file_system, const std::string& path) {
-  return VALUE_OR_STOP(file_system->OpenOutputStream(path));
+  return ValueOrStop(file_system->OpenOutputStream(path));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::OutputStream> fs___FileSystem__OpenAppendStream(
     const std::shared_ptr<fs::FileSystem>& file_system, const std::string& path) {
-  return VALUE_OR_STOP(file_system->OpenAppendStream(path));
+  return ValueOrStop(file_system->OpenAppendStream(path));
 }
 
 // [[arrow::export]]
@@ -218,7 +218,7 @@ std::shared_ptr<fs::SubTreeFileSystem> fs___SubTreeFileSystem__create(
 // [[arrow::export]]
 Rcpp::List fs___FileSystemFromUri(const std::string& path) {
   std::string out_path;
-  auto file_system = VALUE_OR_STOP(fs::FileSystemFromUri(path, &out_path));
+  auto file_system = ValueOrStop(fs::FileSystemFromUri(path, &out_path));
   return Rcpp::List::create(Rcpp::Named("fs") = file_system,
                             Rcpp::Named("path") = out_path);
 }
@@ -228,12 +228,12 @@ Rcpp::List fs___FileSystemFromUri(const std::string& path) {
 #if defined(ARROW_R_WITH_S3)
 
 // [[s3::export]]
-void fs___EnsureS3Initialized() { STOP_IF_NOT_OK(fs::EnsureS3Initialized()); }
+void fs___EnsureS3Initialized() { StopIfNotOk(fs::EnsureS3Initialized()); }
 
 // [[s3::export]]
 std::shared_ptr<fs::S3FileSystem> fs___S3FileSystem__create() {
   auto opts = fs::S3Options::Defaults();
-  return VALUE_OR_STOP(fs::S3FileSystem::Make(opts));
+  return ValueOrStop(fs::S3FileSystem::Make(opts));
 }
 
 #endif
diff --git a/r/src/io.cpp b/r/src/io.cpp
index dc7bcae..41d902a 100644
--- a/r/src/io.cpp
+++ b/r/src/io.cpp
@@ -26,21 +26,21 @@ using Rcpp::RawVector_;
 // [[arrow::export]]
 std::shared_ptr<arrow::Buffer> io___Readable__Read(
     const std::shared_ptr<arrow::io::Readable>& x, int64_t nbytes) {
-  return VALUE_OR_STOP(x->Read(nbytes));
+  return ValueOrStop(x->Read(nbytes));
 }
 
 // ------ arrow::io::InputStream
 
 // [[arrow::export]]
 void io___InputStream__Close(const std::shared_ptr<arrow::io::InputStream>& x) {
-  STOP_IF_NOT_OK(x->Close());
+  StopIfNotOk(x->Close());
 }
 
 // ------ arrow::io::OutputStream
 
 // [[arrow::export]]
 void io___OutputStream__Close(const std::shared_ptr<arrow::io::OutputStream>& x) {
-  STOP_IF_NOT_OK(x->Close());
+  StopIfNotOk(x->Close());
 }
 
 // ------ arrow::io::RandomAccessFile
@@ -48,7 +48,7 @@ void io___OutputStream__Close(const std::shared_ptr<arrow::io::OutputStream>& x)
 // [[arrow::export]]
 int64_t io___RandomAccessFile__GetSize(
     const std::shared_ptr<arrow::io::RandomAccessFile>& x) {
-  return VALUE_OR_STOP(x->GetSize());
+  return ValueOrStop(x->GetSize());
 }
 
 // [[arrow::export]]
@@ -60,30 +60,30 @@ bool io___RandomAccessFile__supports_zero_copy(
 // [[arrow::export]]
 void io___RandomAccessFile__Seek(const std::shared_ptr<arrow::io::RandomAccessFile>& x,
                                  int64_t position) {
-  STOP_IF_NOT_OK(x->Seek(position));
+  StopIfNotOk(x->Seek(position));
 }
 
 // [[arrow::export]]
 int64_t io___RandomAccessFile__Tell(
     const std::shared_ptr<arrow::io::RandomAccessFile>& x) {
-  return VALUE_OR_STOP(x->Tell());
+  return ValueOrStop(x->Tell());
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Buffer> io___RandomAccessFile__Read0(
     const std::shared_ptr<arrow::io::RandomAccessFile>& x) {
-  int64_t current = VALUE_OR_STOP(x->Tell());
+  int64_t current = ValueOrStop(x->Tell());
 
-  int64_t n = VALUE_OR_STOP(x->GetSize());
+  int64_t n = ValueOrStop(x->GetSize());
 
-  return VALUE_OR_STOP(x->Read(n - current));
+  return ValueOrStop(x->Read(n - current));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Buffer> io___RandomAccessFile__ReadAt(
     const std::shared_ptr<arrow::io::RandomAccessFile>& x, int64_t position,
     int64_t nbytes) {
-  return VALUE_OR_STOP(x->ReadAt(position, nbytes));
+  return ValueOrStop(x->ReadAt(position, nbytes));
 }
 
 // ------ arrow::io::MemoryMappedFile
@@ -91,19 +91,19 @@ std::shared_ptr<arrow::Buffer> io___RandomAccessFile__ReadAt(
 // [[arrow::export]]
 std::shared_ptr<arrow::io::MemoryMappedFile> io___MemoryMappedFile__Create(
     const std::string& path, int64_t size) {
-  return VALUE_OR_STOP(arrow::io::MemoryMappedFile::Create(path, size));
+  return ValueOrStop(arrow::io::MemoryMappedFile::Create(path, size));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::io::MemoryMappedFile> io___MemoryMappedFile__Open(
     const std::string& path, arrow::io::FileMode::type mode) {
-  return VALUE_OR_STOP(arrow::io::MemoryMappedFile::Open(path, mode));
+  return ValueOrStop(arrow::io::MemoryMappedFile::Open(path, mode));
 }
 
 // [[arrow::export]]
 void io___MemoryMappedFile__Resize(const std::shared_ptr<arrow::io::MemoryMappedFile>& x,
                                    int64_t size) {
-  STOP_IF_NOT_OK(x->Resize(size));
+  StopIfNotOk(x->Resize(size));
 }
 
 // ------ arrow::io::ReadableFile
@@ -111,7 +111,7 @@ void io___MemoryMappedFile__Resize(const std::shared_ptr<arrow::io::MemoryMapped
 // [[arrow::export]]
 std::shared_ptr<arrow::io::ReadableFile> io___ReadableFile__Open(
     const std::string& path) {
-  return VALUE_OR_STOP(arrow::io::ReadableFile::Open(path));
+  return ValueOrStop(arrow::io::ReadableFile::Open(path));
 }
 
 // ------ arrow::io::BufferReader
@@ -127,14 +127,14 @@ std::shared_ptr<arrow::io::BufferReader> io___BufferReader__initialize(
 // [[arrow::export]]
 void io___Writable__write(const std::shared_ptr<arrow::io::Writable>& stream,
                           const std::shared_ptr<arrow::Buffer>& buf) {
-  STOP_IF_NOT_OK(stream->Write(buf->data(), buf->size()));
+  StopIfNotOk(stream->Write(buf->data(), buf->size()));
 }
 
 // ------- arrow::io::OutputStream
 
 // [[arrow::export]]
 int64_t io___OutputStream__Tell(const std::shared_ptr<arrow::io::OutputStream>& stream) {
-  return VALUE_OR_STOP(stream->Tell());
+  return ValueOrStop(stream->Tell());
 }
 
 // ------ arrow::io::FileOutputStream
@@ -142,7 +142,7 @@ int64_t io___OutputStream__Tell(const std::shared_ptr<arrow::io::OutputStream>&
 // [[arrow::export]]
 std::shared_ptr<arrow::io::FileOutputStream> io___FileOutputStream__Open(
     const std::string& path) {
-  return VALUE_OR_STOP(arrow::io::FileOutputStream::Open(path));
+  return ValueOrStop(arrow::io::FileOutputStream::Open(path));
 }
 
 // ------ arrow::BufferOutputStream
@@ -150,8 +150,8 @@ std::shared_ptr<arrow::io::FileOutputStream> io___FileOutputStream__Open(
 // [[arrow::export]]
 std::shared_ptr<arrow::io::BufferOutputStream> io___BufferOutputStream__Create(
     int64_t initial_capacity) {
-  return VALUE_OR_STOP(arrow::io::BufferOutputStream::Create(
-      initial_capacity, arrow::default_memory_pool()));
+  return ValueOrStop(arrow::io::BufferOutputStream::Create(initial_capacity,
+                                                           arrow::default_memory_pool()));
 }
 
 // [[arrow::export]]
@@ -163,19 +163,19 @@ int64_t io___BufferOutputStream__capacity(
 // [[arrow::export]]
 std::shared_ptr<arrow::Buffer> io___BufferOutputStream__Finish(
     const std::shared_ptr<arrow::io::BufferOutputStream>& stream) {
-  return VALUE_OR_STOP(stream->Finish());
+  return ValueOrStop(stream->Finish());
 }
 
 // [[arrow::export]]
 int64_t io___BufferOutputStream__Tell(
     const std::shared_ptr<arrow::io::BufferOutputStream>& stream) {
-  return VALUE_OR_STOP(stream->Tell());
+  return ValueOrStop(stream->Tell());
 }
 
 // [[arrow::export]]
 void io___BufferOutputStream__Write(
     const std::shared_ptr<arrow::io::BufferOutputStream>& stream, RawVector_ bytes) {
-  STOP_IF_NOT_OK(stream->Write(bytes.begin(), bytes.size()));
+  StopIfNotOk(stream->Write(bytes.begin(), bytes.size()));
 }
 
 #endif
diff --git a/r/src/json.cpp b/r/src/json.cpp
index 0479121..8bbd042 100644
--- a/r/src/json.cpp
+++ b/r/src/json.cpp
@@ -47,7 +47,7 @@ std::shared_ptr<arrow::json::TableReader> json___TableReader__Make(
     const std::shared_ptr<arrow::json::ReadOptions>& read_options,
     const std::shared_ptr<arrow::json::ParseOptions>& parse_options) {
   std::shared_ptr<arrow::json::TableReader> table_reader;
-  STOP_IF_NOT_OK(arrow::json::TableReader::Make(
+  StopIfNotOk(arrow::json::TableReader::Make(
       arrow::default_memory_pool(), input, *read_options, *parse_options, &table_reader));
   return table_reader;
 }
@@ -56,7 +56,7 @@ std::shared_ptr<arrow::json::TableReader> json___TableReader__Make(
 std::shared_ptr<arrow::Table> json___TableReader__Read(
     const std::shared_ptr<arrow::json::TableReader>& table_reader) {
   std::shared_ptr<arrow::Table> table;
-  STOP_IF_NOT_OK(table_reader->Read(&table));
+  StopIfNotOk(table_reader->Read(&table));
   return table;
 }
 
diff --git a/r/src/message.cpp b/r/src/message.cpp
index 4d7115f..92c4613 100644
--- a/r/src/message.cpp
+++ b/r/src/message.cpp
@@ -59,8 +59,8 @@ std::shared_ptr<arrow::RecordBatch> ipc___ReadRecordBatch__Message__Schema(
     const std::shared_ptr<arrow::Schema>& schema) {
   // TODO: perhaps this should come from the R side
   arrow::ipc::DictionaryMemo memo;
-  return VALUE_OR_STOP(arrow::ipc::ReadRecordBatch(
-      *message, schema, &memo, arrow::ipc::IpcReadOptions::Defaults()));
+  return ValueOrStop(arrow::ipc::ReadRecordBatch(*message, schema, &memo,
+                                                 arrow::ipc::IpcReadOptions::Defaults()));
 }
 
 // [[arrow::export]]
@@ -68,14 +68,14 @@ std::shared_ptr<arrow::Schema> ipc___ReadSchema_InputStream(
     const std::shared_ptr<arrow::io::InputStream>& stream) {
   // TODO: promote to function argument
   arrow::ipc::DictionaryMemo memo;
-  return VALUE_OR_STOP(arrow::ipc::ReadSchema(stream.get(), &memo));
+  return ValueOrStop(arrow::ipc::ReadSchema(stream.get(), &memo));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Schema> ipc___ReadSchema_Message(
     const std::unique_ptr<arrow::ipc::Message>& message) {
   arrow::ipc::DictionaryMemo empty_memo;
-  return VALUE_OR_STOP(arrow::ipc::ReadSchema(*message, &empty_memo));
+  return ValueOrStop(arrow::ipc::ReadSchema(*message, &empty_memo));
 }
 
 //--------- MessageReader
@@ -89,13 +89,13 @@ std::unique_ptr<arrow::ipc::MessageReader> ipc___MessageReader__Open(
 // [[arrow::export]]
 std::unique_ptr<arrow::ipc::Message> ipc___MessageReader__ReadNextMessage(
     const std::unique_ptr<arrow::ipc::MessageReader>& reader) {
-  return VALUE_OR_STOP(reader->ReadNextMessage());
+  return ValueOrStop(reader->ReadNextMessage());
 }
 
 // [[arrow::export]]
 std::unique_ptr<arrow::ipc::Message> ipc___ReadMessage(
     const std::shared_ptr<arrow::io::InputStream>& stream) {
-  return VALUE_OR_STOP(arrow::ipc::ReadMessage(stream.get()));
+  return ValueOrStop(arrow::ipc::ReadMessage(stream.get()));
 }
 
 #endif
diff --git a/r/src/parquet.cpp b/r/src/parquet.cpp
index 562bc5d..a2b3893 100644
--- a/r/src/parquet.cpp
+++ b/r/src/parquet.cpp
@@ -296,7 +296,7 @@ void parquet___arrow___WriteTable(
 std::shared_ptr<arrow::Schema> parquet___arrow___FileReader__GetSchema(
     const std::unique_ptr<parquet::arrow::FileReader>& reader) {
   std::shared_ptr<arrow::Schema> schema;
-  STOP_IF_NOT_OK(reader->GetSchema(&schema));
+  StopIfNotOk(reader->GetSchema(&schema));
   return schema;
 }
 
diff --git a/r/src/py-to-r.cpp b/r/src/py-to-r.cpp
index 491ee57..021b8f4 100644
--- a/r/src/py-to-r.cpp
+++ b/r/src/py-to-r.cpp
@@ -21,13 +21,13 @@
 
 // [[arrow::export]]
 std::shared_ptr<arrow::Array> ImportArray(uintptr_t array, uintptr_t schema) {
-  return VALUE_OR_STOP(arrow::ImportArray(reinterpret_cast<struct ArrowArray*>(array),
-                                          reinterpret_cast<struct ArrowSchema*>(schema)));
+  return ValueOrStop(arrow::ImportArray(reinterpret_cast<struct ArrowArray*>(array),
+                                        reinterpret_cast<struct ArrowSchema*>(schema)));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::RecordBatch> ImportRecordBatch(uintptr_t array, uintptr_t schema) {
-  return VALUE_OR_STOP(
+  return ValueOrStop(
       arrow::ImportRecordBatch(reinterpret_cast<struct ArrowArray*>(array),
                                reinterpret_cast<struct ArrowSchema*>(schema)));
 }
@@ -50,26 +50,25 @@ void delete_arrow_array(uintptr_t ptr) {
 
 // [[arrow::export]]
 void ExportType(const std::shared_ptr<arrow::DataType>& type, uintptr_t ptr) {
-  STOP_IF_NOT_OK(arrow::ExportType(*type, reinterpret_cast<struct ArrowSchema*>(ptr)));
+  StopIfNotOk(arrow::ExportType(*type, reinterpret_cast<struct ArrowSchema*>(ptr)));
 }
 
 // [[arrow::export]]
 void ExportSchema(const std::shared_ptr<arrow::Schema>& schema, uintptr_t ptr) {
-  STOP_IF_NOT_OK(
-      arrow::ExportSchema(*schema, reinterpret_cast<struct ArrowSchema*>(ptr)));
+  StopIfNotOk(arrow::ExportSchema(*schema, reinterpret_cast<struct ArrowSchema*>(ptr)));
 }
 
 // [[arrow::export]]
 void ExportArray(const std::shared_ptr<arrow::Array>& array, uintptr_t ptr,
                  uintptr_t schema_ptr) {
-  STOP_IF_NOT_OK(arrow::ExportArray(*array, reinterpret_cast<struct ArrowArray*>(ptr),
-                                    reinterpret_cast<struct ArrowSchema*>(schema_ptr)));
+  StopIfNotOk(arrow::ExportArray(*array, reinterpret_cast<struct ArrowArray*>(ptr),
+                                 reinterpret_cast<struct ArrowSchema*>(schema_ptr)));
 }
 
 // [[arrow::export]]
 void ExportRecordBatch(const std::shared_ptr<arrow::RecordBatch>& batch, uintptr_t ptr,
                        uintptr_t schema_ptr) {
-  STOP_IF_NOT_OK(
+  StopIfNotOk(
       arrow::ExportRecordBatch(*batch, reinterpret_cast<struct ArrowArray*>(ptr),
                                reinterpret_cast<struct ArrowSchema*>(schema_ptr)));
 }
diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp
index eb375c5..2cbc656 100644
--- a/r/src/recordbatch.cpp
+++ b/r/src/recordbatch.cpp
@@ -112,7 +112,7 @@ bool RecordBatch__Equals(const std::shared_ptr<arrow::RecordBatch>& self,
 std::shared_ptr<arrow::RecordBatch> RecordBatch__RemoveColumn(
     const std::shared_ptr<arrow::RecordBatch>& batch, int i) {
   arrow::r::validate_index(i, batch->num_columns());
-  return VALUE_OR_STOP(batch->RemoveColumn(i));
+  return ValueOrStop(batch->RemoveColumn(i));
 }
 
 // [[arrow::export]]
@@ -153,7 +153,7 @@ Rcpp::RawVector ipc___SerializeRecordBatch__Raw(
     const std::shared_ptr<arrow::RecordBatch>& batch) {
   // how many bytes do we need ?
   int64_t size;
-  STOP_IF_NOT_OK(arrow::ipc::GetRecordBatchSize(*batch, &size));
+  StopIfNotOk(arrow::ipc::GetRecordBatchSize(*batch, &size));
 
   // allocate the result raw vector
   Rcpp::RawVector out(Rcpp::no_init(size));
@@ -161,9 +161,9 @@ Rcpp::RawVector ipc___SerializeRecordBatch__Raw(
   // serialize into the bytes of the raw vector
   auto buffer = std::make_shared<arrow::r::RBuffer<RAWSXP, Rcpp::RawVector>>(out);
   arrow::io::FixedSizeBufferWriter stream(buffer);
-  STOP_IF_NOT_OK(arrow::ipc::SerializeRecordBatch(
+  StopIfNotOk(arrow::ipc::SerializeRecordBatch(
       *batch, arrow::ipc::IpcWriteOptions::Defaults(), &stream));
-  STOP_IF_NOT_OK(stream.Close());
+  StopIfNotOk(stream.Close());
 
   return out;
 }
@@ -174,7 +174,7 @@ std::shared_ptr<arrow::RecordBatch> ipc___ReadRecordBatch__InputStream__Schema(
     const std::shared_ptr<arrow::Schema>& schema) {
   // TODO: promote to function arg
   arrow::ipc::DictionaryMemo memo;
-  return VALUE_OR_STOP(arrow::ipc::ReadRecordBatch(
+  return ValueOrStop(arrow::ipc::ReadRecordBatch(
       schema, &memo, arrow::ipc::IpcReadOptions::Defaults(), stream.get()));
 }
 
@@ -223,7 +223,7 @@ Status count_fields(SEXP lst, int* out) {
 std::shared_ptr<arrow::RecordBatch> RecordBatch__from_arrays__known_schema(
     const std::shared_ptr<arrow::Schema>& schema, SEXP lst) {
   int num_fields;
-  STOP_IF_NOT_OK(arrow::r::count_fields(lst, &num_fields));
+  StopIfNotOk(arrow::r::count_fields(lst, &num_fields));
 
   if (schema->num_fields() != num_fields) {
     Rcpp::stop("incompatible. schema has %d fields, and %d arrays are supplied",
@@ -258,7 +258,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatch__from_arrays__known_schema(
   }
 
   int64_t num_rows = 0;
-  STOP_IF_NOT_OK(arrow::r::check_consistent_array_size(arrays, &num_rows));
+  StopIfNotOk(arrow::r::check_consistent_array_size(arrays, &num_rows));
   return arrow::RecordBatch::Make(schema, num_rows, arrays);
 }
 
@@ -270,7 +270,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatch__from_arrays(SEXP schema_sxp, SE
   }
 
   int num_fields;
-  STOP_IF_NOT_OK(arrow::r::count_fields(lst, &num_fields));
+  StopIfNotOk(arrow::r::count_fields(lst, &num_fields));
 
   // convert lst to a vector of arrow::Array
   std::vector<std::shared_ptr<arrow::Array>> arrays(num_fields);
@@ -307,7 +307,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatch__from_arrays(SEXP schema_sxp, SE
 
   // check all sizes are the same
   int64_t num_rows = 0;
-  STOP_IF_NOT_OK(arrow::r::check_consistent_array_size(arrays, &num_rows));
+  StopIfNotOk(arrow::r::check_consistent_array_size(arrays, &num_rows));
 
   return arrow::RecordBatch::Make(schema, num_rows, arrays);
 }
diff --git a/r/src/recordbatchreader.cpp b/r/src/recordbatchreader.cpp
index 3fce4d0..2405bf8 100644
--- a/r/src/recordbatchreader.cpp
+++ b/r/src/recordbatchreader.cpp
@@ -29,7 +29,7 @@ std::shared_ptr<arrow::Schema> RecordBatchReader__schema(
 std::shared_ptr<arrow::RecordBatch> RecordBatchReader__ReadNext(
     const std::shared_ptr<arrow::RecordBatchReader>& reader) {
   std::shared_ptr<arrow::RecordBatch> batch;
-  STOP_IF_NOT_OK(reader->ReadNext(&batch));
+  StopIfNotOk(reader->ReadNext(&batch));
   return batch;
 }
 
@@ -39,7 +39,7 @@ std::shared_ptr<arrow::RecordBatch> RecordBatchReader__ReadNext(
 std::shared_ptr<arrow::RecordBatchReader> ipc___RecordBatchStreamReader__Open(
     const std::shared_ptr<arrow::io::InputStream>& stream) {
   std::shared_ptr<arrow::RecordBatchReader> reader;
-  return VALUE_OR_STOP(arrow::ipc::RecordBatchStreamReader::Open(stream));
+  return ValueOrStop(arrow::ipc::RecordBatchStreamReader::Open(stream));
 }
 
 // [[arrow::export]]
@@ -49,7 +49,7 @@ std::vector<std::shared_ptr<arrow::RecordBatch>> ipc___RecordBatchStreamReader__
 
   while (true) {
     std::shared_ptr<arrow::RecordBatch> batch;
-    STOP_IF_NOT_OK(reader->ReadNext(&batch));
+    StopIfNotOk(reader->ReadNext(&batch));
     if (!batch) break;
 
     res.push_back(batch);
@@ -78,14 +78,14 @@ std::shared_ptr<arrow::RecordBatch> ipc___RecordBatchFileReader__ReadRecordBatch
   if (i < 0 && i >= reader->num_record_batches()) {
     Rcpp::stop("Record batch index out of bounds");
   }
-  return VALUE_OR_STOP(reader->ReadRecordBatch(i));
+  return ValueOrStop(reader->ReadRecordBatch(i));
 }
 
 // [[arrow::export]]
 std::shared_ptr<arrow::ipc::RecordBatchFileReader> ipc___RecordBatchFileReader__Open(
     const std::shared_ptr<arrow::io::RandomAccessFile>& file) {
   std::shared_ptr<arrow::ipc::RecordBatchFileReader> reader;
-  return VALUE_OR_STOP(arrow::ipc::RecordBatchFileReader::Open(file));
+  return ValueOrStop(arrow::ipc::RecordBatchFileReader::Open(file));
 }
 
 // [[arrow::export]]
@@ -94,10 +94,10 @@ std::shared_ptr<arrow::Table> Table__from_RecordBatchFileReader(
   int num_batches = reader->num_record_batches();
   std::vector<std::shared_ptr<arrow::RecordBatch>> batches(num_batches);
   for (int i = 0; i < num_batches; i++) {
-    batches[i] = VALUE_OR_STOP(reader->ReadRecordBatch(i));
+    batches[i] = ValueOrStop(reader->ReadRecordBatch(i));
   }
 
-  return VALUE_OR_STOP(arrow::Table::FromRecordBatches(std::move(batches)));
+  return ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches)));
 }
 
 // [[arrow::export]]
@@ -106,12 +106,12 @@ std::shared_ptr<arrow::Table> Table__from_RecordBatchStreamReader(
   std::shared_ptr<arrow::RecordBatch> batch;
   std::vector<std::shared_ptr<arrow::RecordBatch>> batches;
   while (true) {
-    STOP_IF_NOT_OK(reader->ReadNext(&batch));
+    StopIfNotOk(reader->ReadNext(&batch));
     if (!batch) break;
     batches.push_back(batch);
   }
 
-  return VALUE_OR_STOP(arrow::Table::FromRecordBatches(std::move(batches)));
+  return ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches)));
 }
 
 // [[arrow::export]]
@@ -121,7 +121,7 @@ std::vector<std::shared_ptr<arrow::RecordBatch>> ipc___RecordBatchFileReader__ba
   std::vector<std::shared_ptr<arrow::RecordBatch>> res(n);
 
   for (int i = 0; i < n; i++) {
-    res[i] = VALUE_OR_STOP(reader->ReadRecordBatch(i));
+    res[i] = ValueOrStop(reader->ReadRecordBatch(i));
   }
 
   return res;
diff --git a/r/src/recordbatchwriter.cpp b/r/src/recordbatchwriter.cpp
index c6ff171..847b335 100644
--- a/r/src/recordbatchwriter.cpp
+++ b/r/src/recordbatchwriter.cpp
@@ -23,20 +23,20 @@
 void ipc___RecordBatchWriter__WriteRecordBatch(
     const std::shared_ptr<arrow::ipc::RecordBatchWriter>& batch_writer,
     const std::shared_ptr<arrow::RecordBatch>& batch) {
-  STOP_IF_NOT_OK(batch_writer->WriteRecordBatch(*batch));
+  StopIfNotOk(batch_writer->WriteRecordBatch(*batch));
 }
 
 // [[arrow::export]]
 void ipc___RecordBatchWriter__WriteTable(
     const std::shared_ptr<arrow::ipc::RecordBatchWriter>& batch_writer,
     const std::shared_ptr<arrow::Table>& table) {
-  STOP_IF_NOT_OK(batch_writer->WriteTable(*table));
+  StopIfNotOk(batch_writer->WriteTable(*table));
 }
 
 // [[arrow::export]]
 void ipc___RecordBatchWriter__Close(
     const std::shared_ptr<arrow::ipc::RecordBatchWriter>& batch_writer) {
-  STOP_IF_NOT_OK(batch_writer->Close());
+  StopIfNotOk(batch_writer->Close());
 }
 
 // [[arrow::export]]
@@ -45,7 +45,7 @@ std::shared_ptr<arrow::ipc::RecordBatchWriter> ipc___RecordBatchFileWriter__Open
     const std::shared_ptr<arrow::Schema>& schema, bool use_legacy_format) {
   auto options = arrow::ipc::IpcWriteOptions::Defaults();
   options.write_legacy_ipc_format = use_legacy_format;
-  return VALUE_OR_STOP(arrow::ipc::NewFileWriter(stream.get(), schema, options));
+  return ValueOrStop(arrow::ipc::NewFileWriter(stream.get(), schema, options));
 }
 
 // [[arrow::export]]
@@ -54,7 +54,7 @@ std::shared_ptr<arrow::ipc::RecordBatchWriter> ipc___RecordBatchStreamWriter__Op
     const std::shared_ptr<arrow::Schema>& schema, bool use_legacy_format) {
   auto options = arrow::ipc::IpcWriteOptions::Defaults();
   options.write_legacy_ipc_format = use_legacy_format;
-  return VALUE_OR_STOP(NewStreamWriter(stream.get(), schema, options));
+  return ValueOrStop(NewStreamWriter(stream.get(), schema, options));
 }
 
 #endif
diff --git a/r/src/schema.cpp b/r/src/schema.cpp
index af74731..35de151 100644
--- a/r/src/schema.cpp
+++ b/r/src/schema.cpp
@@ -85,7 +85,7 @@ std::shared_ptr<arrow::Schema> Schema__WithMetadata(
 Rcpp::RawVector Schema__serialize(const std::shared_ptr<arrow::Schema>& schema) {
   arrow::ipc::DictionaryMemo empty_memo;
   std::shared_ptr<arrow::Buffer> out =
-      VALUE_OR_STOP(arrow::ipc::SerializeSchema(*schema, &empty_memo));
+      ValueOrStop(arrow::ipc::SerializeSchema(*schema, &empty_memo));
 
   auto n = out->size();
   Rcpp::RawVector vec(out->size());
@@ -103,7 +103,7 @@ bool Schema__Equals(const std::shared_ptr<arrow::Schema>& schema,
 // [[arrow::export]]
 std::shared_ptr<arrow::Schema> arrow__UnifySchemas(
     const std::vector<std::shared_ptr<arrow::Schema>>& schemas) {
-  return VALUE_OR_STOP(arrow::UnifySchemas(schemas));
+  return ValueOrStop(arrow::UnifySchemas(schemas));
 }
 
 #endif
diff --git a/r/src/table.cpp b/r/src/table.cpp
index 2b9fc4f..2681548 100644
--- a/r/src/table.cpp
+++ b/r/src/table.cpp
@@ -28,7 +28,7 @@ using Rcpp::DataFrame;
 std::shared_ptr<arrow::Table> Table__from_dataframe(DataFrame tbl) {
   auto rb = RecordBatch__from_dataframe(tbl);
 
-  return VALUE_OR_STOP(arrow::Table::FromRecordBatches({std::move(rb)}));
+  return ValueOrStop(arrow::Table::FromRecordBatches({std::move(rb)}));
 }
 
 // [[arrow::export]]
@@ -97,13 +97,13 @@ bool Table__Equals(const std::shared_ptr<arrow::Table>& lhs,
 
 // [[arrow::export]]
 bool Table__Validate(const std::shared_ptr<arrow::Table>& table) {
-  STOP_IF_NOT_OK(table->Validate());
+  StopIfNotOk(table->Validate());
   return true;
 }
 
 // [[arrow::export]]
 bool Table__ValidateFull(const std::shared_ptr<arrow::Table>& table) {
-  STOP_IF_NOT_OK(table->ValidateFull());
+  StopIfNotOk(table->ValidateFull());
   return true;
 }
 
@@ -150,15 +150,15 @@ std::shared_ptr<arrow::Table> Table__from_dots(SEXP lst, SEXP schema_sxp) {
 
     if (Rf_inherits(schema_sxp, "Schema")) {
       auto schema = arrow::r::extract<arrow::Schema>(schema_sxp);
-      tab = VALUE_OR_STOP(arrow::Table::FromRecordBatches(schema, std::move(batches)));
+      tab = ValueOrStop(arrow::Table::FromRecordBatches(schema, std::move(batches)));
     } else {
-      tab = VALUE_OR_STOP(arrow::Table::FromRecordBatches(std::move(batches)));
+      tab = ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches)));
     }
     return tab;
   }
 
   int num_fields;
-  STOP_IF_NOT_OK(arrow::r::count_fields(lst, &num_fields));
+  StopIfNotOk(arrow::r::count_fields(lst, &num_fields));
 
   std::vector<std::shared_ptr<arrow::ChunkedArray>> columns(num_fields);
   std::shared_ptr<arrow::Schema> schema;
diff --git a/r/src/threadpool.cpp b/r/src/threadpool.cpp
index b7a8c82..0a2013d 100644
--- a/r/src/threadpool.cpp
+++ b/r/src/threadpool.cpp
@@ -45,7 +45,7 @@ int GetCpuThreadPoolCapacity() { return arrow::GetCpuThreadPoolCapacity(); }
 //' @export
 // [[arrow::export]]
 void SetCpuThreadPoolCapacity(int threads) {
-  STOP_IF_NOT_OK(arrow::SetCpuThreadPoolCapacity(threads));
+  StopIfNotOk(arrow::SetCpuThreadPoolCapacity(threads));
 }
 
 #endif


[arrow] 12/28: ARROW-8502: [Release][APT][Yum] Ignore all Linux packages for arm64v8

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d3d99c5820a18c34d5279b5beef29699507ed314
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Apr 18 12:03:24 2020 +0900

    ARROW-8502: [Release][APT][Yum] Ignore all Linux packages for arm64v8
    
    Because we don't build them for 0.17.0 RC0.
    
    Closes #6973 from kou/release-verify-rc-binaries-ignore-arm
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 dev/release/verify-release-candidate.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 7319947..7961f2d 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -147,6 +147,8 @@ test_apt() {
     # We can't build some arm64 binaries by Crossbow for now.
     if [ "${target}" = "arm64v8/debian:stretch" ]; then continue; fi
     if [ "${target}" = "arm64v8/debian:buster" ]; then continue; fi
+    if [ "${target}" = "arm64v8/ubuntu:xenial" ]; then continue; fi
+    if [ "${target}" = "arm64v8/ubuntu:bionic" ]; then continue; fi
     if [ "${target}" = "arm64v8/ubuntu:eoan" ]; then continue; fi
     if [ "${target}" = "arm64v8/ubuntu:focal" ]; then continue; fi
     case "${target}" in
@@ -177,6 +179,7 @@ test_yum() {
                 "centos:8" \
                 "arm64v8/centos:8"; do
     # We can't build some arm64 binaries by Crossbow for now.
+    if [ "${target}" = "arm64v8/centos:7" ]; then continue; fi
     if [ "${target}" = "arm64v8/centos:8" ]; then continue; fi
     case "${target}" in
       arm64v8/*)


[arrow] 13/28: ARROW-8503: [Packaging][deb] Fix building apache-arrow-archive-keyring for RC

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d8de5790fce3c317db404153af4f103559cc6811
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Apr 18 13:20:11 2020 +0900

    ARROW-8503: [Packaging][deb] Fix building apache-arrow-archive-keyring for RC
    
    Closes #6974 from kou/packaging-linux-rc
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 .../linux-packages/apache-arrow-archive-keyring/Rakefile  |  8 +++++++-
 dev/tasks/linux-packages/package-task.rb                  | 15 +++++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/dev/tasks/linux-packages/apache-arrow-archive-keyring/Rakefile b/dev/tasks/linux-packages/apache-arrow-archive-keyring/Rakefile
index 35518c7..9c1ac97 100644
--- a/dev/tasks/linux-packages/apache-arrow-archive-keyring/Rakefile
+++ b/dev/tasks/linux-packages/apache-arrow-archive-keyring/Rakefile
@@ -44,7 +44,13 @@ class ApacheArrowArchiveKeyringPackageTask < PackageTask
 
     if deb_archive_name != @archive_name
       file deb_archive_name => @archive_name do
-        cp(@archive_name, deb_archive_name)
+        if @archive_base_name == deb_archive_base_name
+          cp(@archive_name, deb_archive_name)
+        else
+          sh("tar", "xf", @archive_name)
+          mv(@archive_base_name, deb_archive_base_name)
+          sh("tar", "czf", deb_archive_name, deb_archive_base_name)
+        end
       end
     end
   end
diff --git a/dev/tasks/linux-packages/package-task.rb b/dev/tasks/linux-packages/package-task.rb
index 1197b1b..ebe906e 100644
--- a/dev/tasks/linux-packages/package-task.rb
+++ b/dev/tasks/linux-packages/package-task.rb
@@ -39,15 +39,18 @@ class PackageTask
       type = $2
       if type == "rc" and options[:rc_build_type] == :release
         @deb_upstream_version = base_version
+        @deb_archive_base_name_version = base_version
         @rpm_version = base_version
         @rpm_release = "1"
       else
         @deb_upstream_version = "#{base_version}~#{sub_version}"
+        @deb_archive_base_name_version = @version
         @rpm_version = base_version
         @rpm_release = "0.#{sub_version}"
       end
     else
       @deb_upstream_version = @version
+      @deb_archive_base_name_version = @version
       @rpm_version = @version
       @rpm_release = "1"
     end
@@ -196,6 +199,10 @@ class PackageTask
     ]
   end
 
+  def deb_archive_base_name
+    "#{@package}-#{@deb_archive_base_name_version}"
+  end
+
   def deb_archive_name
     "#{@package}-#{@deb_upstream_version}.tar.gz"
   end
@@ -291,14 +298,14 @@ VERSION=#{@deb_upstream_version}
     ]
   end
 
-  def rpm_archive_name
-    "#{rpm_archive_base_name}.tar.gz"
-  end
-
   def rpm_archive_base_name
     "#{@package}-#{@rpm_version}"
   end
 
+  def rpm_archive_name
+    "#{rpm_archive_base_name}.tar.gz"
+  end
+
   def yum_dir
     "yum"
   end


[arrow] 14/28: ARROW-8506: [C++] Add tests to verify the encoded stream of RLE with bit_width > 8

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 636d820aa360f71919470a809c7f16d2c84b098d
Author: Kazuaki Ishizaki <is...@jp.ibm.com>
AuthorDate: Sat Apr 18 12:19:29 2020 +0200

    ARROW-8506: [C++] Add tests to verify the encoded stream of RLE with bit_width > 8
    
    This PR adds test cases to verify whether the encoded values are stored in a little-endian format when RLE with bit_width > 8 is applied. Parquet encoder/decoder handles the value as little-endian as follows:
    https://github.com/apache/parquet-mr/blob/master/parquet-column/src/main/java/org/apache/parquet/column/values/rle/RunLengthBitPackingHybridEncoder.java#L244
    https://github.com/apache/parquet-mr/blob/master/parquet-column/src/main/java/org/apache/parquet/column/values/rle/RunLengthBitPackingHybridDecoder.java#L87
    
    There is no test of this type in the current test cases of Rle.
    
    Closes #6976 from kiszk/ARROW-8506
    
    Authored-by: Kazuaki Ishizaki <is...@jp.ibm.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/util/rle_encoding_test.cc | 38 +++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/cpp/src/arrow/util/rle_encoding_test.cc b/cpp/src/arrow/util/rle_encoding_test.cc
index b9e62b1..4499565 100644
--- a/cpp/src/arrow/util/rle_encoding_test.cc
+++ b/cpp/src/arrow/util/rle_encoding_test.cc
@@ -306,6 +306,44 @@ TEST(Rle, SpecificSequences) {
     ValidateRle(values, width, nullptr,
                 1 + static_cast<int>(BitUtil::CeilDiv(width * num_values, 8)));
   }
+
+  // Test 16-bit values to confirm encoded values are stored in little endian
+  values.resize(28);
+  for (int i = 0; i < 16; ++i) {
+    values[i] = 0x55aa;
+  }
+  for (int i = 16; i < 28; ++i) {
+    values[i] = 0xaa55;
+  }
+  expected_buffer[0] = (16 << 1);
+  expected_buffer[1] = 0xaa;
+  expected_buffer[2] = 0x55;
+  expected_buffer[3] = (12 << 1);
+  expected_buffer[4] = 0x55;
+  expected_buffer[5] = 0xaa;
+
+  ValidateRle(values, 16, expected_buffer, 6);
+
+  // Test 32-bit values to confirm encoded values are stored in little endian
+  values.resize(28);
+  for (int i = 0; i < 16; ++i) {
+    values[i] = 0x555aaaa5;
+  }
+  for (int i = 16; i < 28; ++i) {
+    values[i] = 0x5aaaa555;
+  }
+  expected_buffer[0] = (16 << 1);
+  expected_buffer[1] = 0xa5;
+  expected_buffer[2] = 0xaa;
+  expected_buffer[3] = 0x5a;
+  expected_buffer[4] = 0x55;
+  expected_buffer[5] = (12 << 1);
+  expected_buffer[6] = 0x55;
+  expected_buffer[7] = 0xa5;
+  expected_buffer[8] = 0xaa;
+  expected_buffer[9] = 0x5a;
+
+  ValidateRle(values, 32, expected_buffer, 10);
 }
 
 // ValidateRle on 'num_vals' values with width 'bit_width'. If 'value' != -1, that value


[arrow] 23/28: ARROW-8515: [C++] Bitmap::ToString should group by bytes

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b5aaed894845c5cad3cf782901293a8aaee07d2c
Author: Micah Kornfield <em...@gmail.com>
AuthorDate: Mon Apr 20 11:10:36 2020 +0200

    ARROW-8515: [C++] Bitmap::ToString should group by bytes
    
    Closes #6987 from emkornfield/grouped_binary
    
    Authored-by: Micah Kornfield <em...@gmail.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/util/bit_util.cc      |  4 ++--
 cpp/src/arrow/util/bit_util_test.cc | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/cpp/src/arrow/util/bit_util.cc b/cpp/src/arrow/util/bit_util.cc
index 15bc561..319af78 100644
--- a/cpp/src/arrow/util/bit_util.cc
+++ b/cpp/src/arrow/util/bit_util.cc
@@ -323,9 +323,9 @@ Result<std::shared_ptr<Buffer>> BitmapOp(MemoryPool* pool, const uint8_t* left,
 }  // namespace
 
 std::string Bitmap::ToString() const {
-  std::string out(length_, '0');
+  std::string out(length_ + ((length_ - 1) / 8), ' ');
   for (int64_t i = 0; i < length_; ++i) {
-    out[i] = GetBit(i) ? '1' : '0';
+    out[i + (i / 8)] = GetBit(i) ? '1' : '0';
   }
   return out;
 }
diff --git a/cpp/src/arrow/util/bit_util_test.cc b/cpp/src/arrow/util/bit_util_test.cc
index a8e6279..40f2a33 100644
--- a/cpp/src/arrow/util/bit_util_test.cc
+++ b/cpp/src/arrow/util/bit_util_test.cc
@@ -1240,6 +1240,17 @@ TEST(Bitmap, VisitPartialWords) {
 
 #endif  // ARROW_VALGRIND
 
+TEST(Bitmap, ToString) {
+  uint64_t bitmap_value = 0xCAAC;
+  uint8_t* bitmap = reinterpret_cast<uint8_t*>(&bitmap_value);
+  EXPECT_EQ(Bitmap(bitmap, /*bit_offset*/ 0, /*length=*/34).ToString(),
+            "00110101 01010011 00000000 00000000 00");
+  EXPECT_EQ(Bitmap(bitmap, /*bit_offset*/ 0, /*length=*/16).ToString(),
+            "00110101 01010011");
+  EXPECT_EQ(Bitmap(bitmap, /*bit_offset*/ 0, /*length=*/11).ToString(), "00110101 010");
+  EXPECT_EQ(Bitmap(bitmap, /*bit_offset*/ 3, /*length=*/8).ToString(), "10101010");
+}
+
 // compute bitwise AND of bitmaps using word-wise visit
 TEST(Bitmap, VisitWordsAnd) {
   constexpr int64_t nbytes = 1 << 10;


[arrow] 17/28: ARROW-8360: [C++][Gandiva] Fixes date32 support for date/time functions

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cc2b8cc6a50c268439d6a63035960f9a44bcd38d
Author: Yuan Zhou <yu...@intel.com>
AuthorDate: Sat Apr 18 18:25:40 2020 +0530

    ARROW-8360: [C++][Gandiva] Fixes date32 support for date/time functions
    
    Gandiva date/time functions like extractYear only work with
    millisecond, passing date32 to these functions will get wrong
    results.
    
    This patch adds a new function castDATE_date32 to convert date32
    to date64. date/time functions should do a castDATE_date32 first,
    e.g.: extractYear(castDATE(date32_days)).
    
    Signed-off-by: Yuan Zhou <yu...@intel.com>
    
    Closes #6861 from zhouyuan/wip_gandiva_func_date32 and squashes the following commits:
    
    a3019a303 <Yuan Zhou>  Fixes date32 support for date/time functions
    
    Authored-by: Yuan Zhou <yu...@intel.com>
    Signed-off-by: Praveen <pr...@dremio.com>
---
 cpp/src/gandiva/function_registry_arithmetic.cc |  1 +
 cpp/src/gandiva/precompiled/time.cc             |  5 +-
 cpp/src/gandiva/precompiled/time_test.cc        |  2 +
 cpp/src/gandiva/precompiled/types.h             |  2 +
 cpp/src/gandiva/tests/date_time_test.cc         | 75 +++++++++++++++++++++----
 5 files changed, 72 insertions(+), 13 deletions(-)

diff --git a/cpp/src/gandiva/function_registry_arithmetic.cc b/cpp/src/gandiva/function_registry_arithmetic.cc
index d24020f..dca273e 100644
--- a/cpp/src/gandiva/function_registry_arithmetic.cc
+++ b/cpp/src/gandiva/function_registry_arithmetic.cc
@@ -62,6 +62,7 @@ std::vector<NativeFunction> GetArithmeticFunctionRegistry() {
 
       UNARY_SAFE_NULL_IF_NULL(castDATE, {}, int64, date64),
       UNARY_SAFE_NULL_IF_NULL(castDATE, {}, int32, date32),
+      UNARY_SAFE_NULL_IF_NULL(castDATE, {}, date32, date64),
 
       // add/sub/multiply/divide/mod
       BINARY_SYMMETRIC_FN(add, {}), BINARY_SYMMETRIC_FN(subtract, {}),
diff --git a/cpp/src/gandiva/precompiled/time.cc b/cpp/src/gandiva/precompiled/time.cc
index fa38e13..bdfc189 100644
--- a/cpp/src/gandiva/precompiled/time.cc
+++ b/cpp/src/gandiva/precompiled/time.cc
@@ -37,7 +37,6 @@ extern "C" {
 
 // Expand inner macro for all date types.
 #define DATE_TYPES(INNER) \
-  INNER(date32)           \
   INNER(date64)           \
   INNER(timestamp)
 
@@ -454,9 +453,13 @@ DATE_TRUNC_FUNCTIONS(timestamp)
 
 FORCE_INLINE
 gdv_date64 castDATE_int64(gdv_int64 in) { return in; }
+
 FORCE_INLINE
 gdv_date32 castDATE_int32(gdv_int32 in) { return in; }
 
+FORCE_INLINE
+gdv_date64 castDATE_date32(gdv_date32 days) { return days * MILLIS_IN_DAY; }
+
 static int days_in_month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
 bool IsLastDayOfMonth(const EpochTimePoint& tp) {
diff --git a/cpp/src/gandiva/precompiled/time_test.cc b/cpp/src/gandiva/precompiled/time_test.cc
index 9771b7e..bb734d9 100644
--- a/cpp/src/gandiva/precompiled/time_test.cc
+++ b/cpp/src/gandiva/precompiled/time_test.cc
@@ -52,6 +52,8 @@ TEST(TestTime, TestCastDate) {
   EXPECT_EQ(castDATE_utf8(context_ptr, "71-1-1", 6), 31536000000);
   EXPECT_EQ(castDATE_utf8(context_ptr, "71-45-1", 7), 0);
   EXPECT_EQ(castDATE_utf8(context_ptr, "71-12-XX", 8), 0);
+
+  EXPECT_EQ(castDATE_date32(1), 86400000);
 }
 
 TEST(TestTime, TestCastTimestamp) {
diff --git a/cpp/src/gandiva/precompiled/types.h b/cpp/src/gandiva/precompiled/types.h
index 45bc72b..11529bf 100644
--- a/cpp/src/gandiva/precompiled/types.h
+++ b/cpp/src/gandiva/precompiled/types.h
@@ -169,6 +169,8 @@ gdv_date64 castDATE_utf8(int64_t execution_context, const char* input, gdv_int32
 
 gdv_date64 castDATE_int64(gdv_int64 date);
 
+gdv_date64 castDATE_date32(gdv_date32 date);
+
 gdv_date32 castDATE_int32(gdv_int32 date);
 
 gdv_timestamp castTIMESTAMP_utf8(int64_t execution_context, const char* input,
diff --git a/cpp/src/gandiva/tests/date_time_test.cc b/cpp/src/gandiva/tests/date_time_test.cc
index 79b6109..11371b0 100644
--- a/cpp/src/gandiva/tests/date_time_test.cc
+++ b/cpp/src/gandiva/tests/date_time_test.cc
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <time.h>
 #include "arrow/memory_pool.h"
+#include "gandiva/precompiled/time_constants.h"
 #include "gandiva/projector.h"
 #include "gandiva/tests/test_util.h"
 #include "gandiva/tree_expr_builder.h"
@@ -88,6 +89,26 @@ int64_t MillisSince(time_t base_line, int32_t yy, int32_t mm, int32_t dd, int32_
   return static_cast<int64_t>(ts - base_line) * 1000 + millis;
 }
 
+int32_t DaysSince(time_t base_line, int32_t yy, int32_t mm, int32_t dd, int32_t hr,
+                  int32_t min, int32_t sec, int32_t millis) {
+  struct tm given_ts;
+  memset(&given_ts, 0, sizeof(struct tm));
+  given_ts.tm_year = (yy - 1900);
+  given_ts.tm_mon = (mm - 1);
+  given_ts.tm_mday = dd;
+  given_ts.tm_hour = hr;
+  given_ts.tm_min = min;
+  given_ts.tm_sec = sec;
+
+  time_t ts = mktime(&given_ts);
+  if (ts == static_cast<time_t>(-1)) {
+    ARROW_LOG(FATAL) << "mktime() failed";
+  }
+  // time_t is an arithmetic type on both POSIX and Windows, we can simply
+  // subtract to get a duration in seconds.
+  return static_cast<int32_t>(((ts - base_line) * 1000 + millis) / MILLIS_IN_DAY);
+}
+
 TEST_F(TestProjector, TestIsNull) {
   auto d0 = field("d0", date64());
   auto t0 = field("t0", time32(arrow::TimeUnit::MILLI));
@@ -170,14 +191,16 @@ TEST_F(TestProjector, TestDate32IsNull) {
 
 TEST_F(TestProjector, TestDateTime) {
   auto field0 = field("f0", date64());
+  auto field1 = field("f1", date32());
   auto field2 = field("f2", timestamp(arrow::TimeUnit::MILLI));
-  auto schema = arrow::schema({field0, field2});
+  auto schema = arrow::schema({field0, field1, field2});
 
   // output fields
   auto field_year = field("yy", int64());
   auto field_month = field("mm", int64());
   auto field_day = field("dd", int64());
   auto field_hour = field("hh", int64());
+  auto field_date64 = field("date64", date64());
 
   // extract year and month from date
   auto date2year_expr =
@@ -185,15 +208,30 @@ TEST_F(TestProjector, TestDateTime) {
   auto date2month_expr =
       TreeExprBuilder::MakeExpression("extractMonth", {field0}, field_month);
 
+  // extract year and month from date32, cast to date64 first
+  auto node_f1 = TreeExprBuilder::MakeField(field1);
+  auto date32_to_date64_func =
+      TreeExprBuilder::MakeFunction("castDATE", {node_f1}, date64());
+
+  auto date64_2year_func =
+      TreeExprBuilder::MakeFunction("extractYear", {date32_to_date64_func}, int64());
+  auto date64_2year_expr = TreeExprBuilder::MakeExpression(date64_2year_func, field_year);
+
+  auto date64_2month_func =
+      TreeExprBuilder::MakeFunction("extractMonth", {date32_to_date64_func}, int64());
+  auto date64_2month_expr =
+      TreeExprBuilder::MakeExpression(date64_2month_func, field_month);
+
   // extract month and day from timestamp
   auto ts2month_expr =
       TreeExprBuilder::MakeExpression("extractMonth", {field2}, field_month);
   auto ts2day_expr = TreeExprBuilder::MakeExpression("extractDay", {field2}, field_day);
 
   std::shared_ptr<Projector> projector;
-  auto status = Projector::Make(
-      schema, {date2year_expr, date2month_expr, ts2month_expr, ts2day_expr},
-      TestConfiguration(), &projector);
+  auto status = Projector::Make(schema,
+                                {date2year_expr, date2month_expr, date64_2year_expr,
+                                 date64_2month_expr, ts2month_expr, ts2day_expr},
+                                TestConfiguration(), &projector);
   ASSERT_TRUE(status.ok());
 
   // Create a row-batch with some sample data
@@ -207,6 +245,13 @@ TEST_F(TestProjector, TestDateTime) {
   auto array0 =
       MakeArrowTypeArray<arrow::Date64Type, int64_t>(date64(), field0_data, validity);
 
+  std::vector<int32_t> field1_data = {DaysSince(epoch, 2000, 1, 1, 5, 0, 0, 0),
+                                      DaysSince(epoch, 1999, 12, 31, 5, 0, 0, 0),
+                                      DaysSince(epoch, 2015, 6, 30, 20, 0, 0, 0),
+                                      DaysSince(epoch, 2015, 7, 1, 20, 0, 0, 0)};
+  auto array1 =
+      MakeArrowTypeArray<arrow::Date32Type, int32_t>(date32(), field1_data, validity);
+
   std::vector<int64_t> field2_data = {MillisSince(epoch, 1999, 12, 31, 5, 0, 0, 0),
                                       MillisSince(epoch, 2000, 1, 2, 5, 0, 0, 0),
                                       MillisSince(epoch, 2015, 7, 1, 1, 0, 0, 0),
@@ -216,16 +261,20 @@ TEST_F(TestProjector, TestDateTime) {
       arrow::timestamp(arrow::TimeUnit::MILLI), field2_data, validity);
 
   // expected output
-  // date 2 year and date 2 month
-  auto exp_yy_from_date = MakeArrowArrayInt64({2000, 1999, 2015, 2015}, validity);
-  auto exp_mm_from_date = MakeArrowArrayInt64({1, 12, 6, 7}, validity);
+  // date 2 year and date 2 month for date64
+  auto exp_yy_from_date64 = MakeArrowArrayInt64({2000, 1999, 2015, 2015}, validity);
+  auto exp_mm_from_date64 = MakeArrowArrayInt64({1, 12, 6, 7}, validity);
+
+  // date 2 year and date 2 month for date32
+  auto exp_yy_from_date32 = MakeArrowArrayInt64({2000, 1999, 2015, 2015}, validity);
+  auto exp_mm_from_date32 = MakeArrowArrayInt64({1, 12, 6, 7}, validity);
 
   // ts 2 month and ts 2 day
   auto exp_mm_from_ts = MakeArrowArrayInt64({12, 1, 7, 6}, validity);
   auto exp_dd_from_ts = MakeArrowArrayInt64({31, 2, 1, 29}, validity);
 
   // prepare input record batch
-  auto in_batch = arrow::RecordBatch::Make(schema, num_records, {array0, array2});
+  auto in_batch = arrow::RecordBatch::Make(schema, num_records, {array0, array1, array2});
 
   // Evaluate expression
   arrow::ArrayVector outputs;
@@ -233,10 +282,12 @@ TEST_F(TestProjector, TestDateTime) {
   EXPECT_TRUE(status.ok());
 
   // Validate results
-  EXPECT_ARROW_ARRAY_EQUALS(exp_yy_from_date, outputs.at(0));
-  EXPECT_ARROW_ARRAY_EQUALS(exp_mm_from_date, outputs.at(1));
-  EXPECT_ARROW_ARRAY_EQUALS(exp_mm_from_ts, outputs.at(2));
-  EXPECT_ARROW_ARRAY_EQUALS(exp_dd_from_ts, outputs.at(3));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_yy_from_date64, outputs.at(0));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_mm_from_date64, outputs.at(1));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_yy_from_date32, outputs.at(2));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_mm_from_date32, outputs.at(3));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_mm_from_ts, outputs.at(4));
+  EXPECT_ARROW_ARRAY_EQUALS(exp_dd_from_ts, outputs.at(5));
 }
 
 TEST_F(TestProjector, TestTime) {


[arrow] 07/28: ARROW-8483: [Ruby] Removed irrelevant bits of documentation in Arrow::Table

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5165e0d1ebb7e5e5aa18589915aa2a91ce076d59
Author: Robert Borkowski <rb...@o2.pl>
AuthorDate: Fri Apr 17 09:34:41 2020 +0900

    ARROW-8483: [Ruby] Removed irrelevant bits of documentation in Arrow::Table
    
    These were a copy from example with chunks few lines above:
    https://github.com/apache/arrow/blob/master/ruby/red-arrow/lib/arrow/table.rb#L66
    
    Closes #6957 from robertino/master
    
    Authored-by: Robert Borkowski <rb...@o2.pl>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 ruby/red-arrow/lib/arrow/table.rb | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/ruby/red-arrow/lib/arrow/table.rb b/ruby/red-arrow/lib/arrow/table.rb
index fbf5d3c..2a727ef 100644
--- a/ruby/red-arrow/lib/arrow/table.rb
+++ b/ruby/red-arrow/lib/arrow/table.rb
@@ -81,14 +81,6 @@ module Arrow
     #     `Array`.
     #
     #   @example Create a table from column name and values
-    #     count_chunks = [
-    #       Arrow::UInt32Array.new([0, 2]),
-    #       Arrow::UInt32Array.new([nil, 4]),
-    #     ]
-    #     visible_chunks = [
-    #       Arrow::BooleanArray.new([true]),
-    #       Arrow::BooleanArray.new([nil, nil, false]),
-    #     ]
     #     Arrow::Table.new("count" => [0, 2, nil, 4],
     #                      "visible" => [true, nil, nil, false])
     #


[arrow] 09/28: ARROW-8499: [C++][Dataset] In ScannerBuilder, batch_size will not wor…

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ba9701aa9999f9f8382b6ba65bd919d21f8e3f4
Author: Hongze Zhang <ho...@intel.com>
AuthorDate: Fri Apr 17 10:56:54 2020 -0400

    ARROW-8499: [C++][Dataset] In ScannerBuilder, batch_size will not wor…
    
    …k if projecter is not empty
    
    Closes #6967 from zhztheplayer/ARROW-8499
    
    Authored-by: Hongze Zhang <ho...@intel.com>
    Signed-off-by: Benjamin Kietzman <be...@gmail.com>
---
 cpp/src/arrow/dataset/scanner.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpp/src/arrow/dataset/scanner.cc b/cpp/src/arrow/dataset/scanner.cc
index 701d900..a78450b 100644
--- a/cpp/src/arrow/dataset/scanner.cc
+++ b/cpp/src/arrow/dataset/scanner.cc
@@ -43,6 +43,7 @@ std::shared_ptr<ScanOptions> ScanOptions::ReplaceSchema(
   auto copy = ScanOptions::Make(std::move(schema));
   copy->filter = filter;
   copy->evaluator = evaluator;
+  copy->batch_size = batch_size;
   return copy;
 }
 


[arrow] 15/28: ARROW-8496: [C++] Refine ByteStreamSplitDecodeScalar

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b96cd3604d1eb78b7b6f7caec4752702b04af0a3
Author: Yibo Cai <yi...@arm.com>
AuthorDate: Sat Apr 18 12:20:59 2020 +0200

    ARROW-8496: [C++] Refine ByteStreamSplitDecodeScalar
    
    I simplified DecoderScalar code and see huge performance boost from
    clang generated code. Per my test on Intel E5-2650 with clang-9,
    Decode_Float_Scalar test jumps from 600M/s to 20G/s, even better
    than SSE version(17G/s). Similar behaviour observed on Arm64.
    
    Some digging shows clang auto vectorized the simplified decoder code,
    but gcc cannot: https://godbolt.org/z/kq9FAs
    Interestingly, gcc is able to auto vectorize EncoderFloatScalar code,
    but clang cannot: https://godbolt.org/z/E3LnZD
    
    NOTE: This scalar code is not tested in default x86_64 build, which
    goes the SSE version. Arm64 build goes this scalar code path.
    
    Closes #6962 from cyb70289/bytesplit
    
    Authored-by: Yibo Cai <yi...@arm.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/util/byte_stream_split.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cpp/src/arrow/util/byte_stream_split.h b/cpp/src/arrow/util/byte_stream_split.h
index eff595e..46be2e7 100644
--- a/cpp/src/arrow/util/byte_stream_split.h
+++ b/cpp/src/arrow/util/byte_stream_split.h
@@ -595,14 +595,13 @@ template <typename T>
 void ByteStreamSplitDecodeScalar(const uint8_t* data, int64_t num_values, int64_t stride,
                                  T* out) {
   constexpr size_t kNumStreams = sizeof(T);
+  auto output_buffer_raw = reinterpret_cast<uint8_t*>(out);
 
   for (int64_t i = 0; i < num_values; ++i) {
-    uint8_t gathered_byte_data[kNumStreams];
     for (size_t b = 0; b < kNumStreams; ++b) {
       const size_t byte_index = b * stride + i;
-      gathered_byte_data[b] = data[byte_index];
+      output_buffer_raw[i * kNumStreams + b] = data[byte_index];
     }
-    out[i] = arrow::util::SafeLoadAs<T>(&gathered_byte_data[0]);
   }
 }
 


[arrow] 04/28: ARROW-8474: [CI][Crossbow] Skip some nightlies we don't need to run

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a74d32cbc518b82dd8f522d88181e37a5503e4b7
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Thu Apr 16 13:20:10 2020 -0400

    ARROW-8474: [CI][Crossbow] Skip some nightlies we don't need to run
    
    Closes #6952 from nealrichardson/fix-nightlies2
    
    Authored-by: Neal Richardson <ne...@gmail.com>
    Signed-off-by: François Saint-Jacques <fs...@gmail.com>
---
 dev/tasks/tasks.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 16b9c4c..dc2215f 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -96,7 +96,9 @@ groups:
     - ubuntu-*-amd64
     - conda-*
     - gandiva-*
-    - homebrew-*
+    # List the homebrews explicitly because we don't care about running homebrew-cpp-autobrew
+    - homebrew-cpp
+    - homebrew-r-autobrew
     - test-*
     - wheel-*
 
@@ -2146,7 +2148,8 @@ tasks:
       run:
         - conda-python-spark
 
-  test-conda-cpp-hiveserver2:
+  # Remove the "skipped-" prefix in ARROW-8475
+  skipped-test-conda-cpp-hiveserver2:
     ci: circle
     platform: linux
     template: docker-tests/circle.linux.yml


[arrow] 19/28: ARROW-8511: [Release] In verify-release-candidate.bat, exit when CMake build fails, use Unity build

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f626af63b82ecf43a6f14b2311447bf7ac054fc
Author: Wes McKinney <we...@apache.org>
AuthorDate: Sun Apr 19 15:29:04 2020 -0500

    ARROW-8511: [Release] In verify-release-candidate.bat, exit when CMake build fails, use Unity build
    
    The unity build makes things faster, but it also hides the error reported in ARROW-8510. This at least allows the release verification to pass for 0.17.0
    
    Closes #6978 from wesm/ARROW-8511
    
    Authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Wes McKinney <we...@apache.org>
---
 dev/release/verify-release-candidate.bat | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev/release/verify-release-candidate.bat b/dev/release/verify-release-candidate.bat
index 1f99539..9b9ec8b 100644
--- a/dev/release/verify-release-candidate.bat
+++ b/dev/release/verify-release-candidate.bat
@@ -81,6 +81,7 @@ cmake -G "%GENERATOR%" ^
       -DARROW_BUILD_TESTS=ON ^
       -DGTest_SOURCE=BUNDLED ^
       -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+      -DCMAKE_UNITY_BUILD=ON ^
       -DARROW_CXXFLAGS="/MP" ^
       -DARROW_WITH_BZ2=ON ^
       -DARROW_WITH_ZLIB=ON ^
@@ -94,7 +95,7 @@ cmake -G "%GENERATOR%" ^
       -DARROW_PARQUET=ON ^
       ..  || exit /B
 
-cmake --build . --target INSTALL --config Release
+cmake --build . --target INSTALL --config Release || exit /B 1
 
 @rem NOTE(wesm): Building googletest is flaky for me with ninja. Building it
 @rem first fixes the problem


[arrow] 06/28: ARROW-7801: [Developer] Add issue_comment workflow to fix lint/style/codegen

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f42ba924531bb8ba581e83452988f555a766b9a8
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Thu Apr 16 16:18:27 2020 -0700

    ARROW-7801: [Developer] Add issue_comment workflow to fix lint/style/codegen
    
    #6411 tried to do this work automatically, but some were uncomfortable with that; this version instead is triggered by PR comment.
    
    Currently implemented:
    
    * R documentation (`roxygen2`, updating `r/man/*.Rd` based on docstrings in `r/R/*.R`)
    * clang-format on changes to `cpp/src` or `r/src`
    * cmake_format is currently disabled because I didn't feel like fighting further with python versions and environments; in https://github.com/nealrichardson/arrow/runs/590355718?check_suite_focus=true#step:5:34 you can see that it pip installs cmake_format but then in the next line can't find cmake_format :shrug:
    
    To trigger the build, add a comment with the message "autotune" (seemed appropriate since this is using computers to make sure our code stays in harmony). By default it will check for which files changed and only run the relevant tasks, but if you comment "autotune everything" it will run everything.
    
    Since `issue_comment` workflows are only run off the master branch, I tested this by merging these commits to master on my fork and triggering it on a PR there. See e.g. https://github.com/nealrichardson/arrow/pull/2#issuecomment-613138356
    
    Closes #6932 from nealrichardson/autotune2
    
    Authored-by: Neal Richardson <ne...@gmail.com>
    Signed-off-by: Neal Richardson <ne...@gmail.com>
---
 .github/workflows/comment_bot.yml | 76 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 72 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml
index d501d97..4eed869 100644
--- a/.github/workflows/comment_bot.yml
+++ b/.github/workflows/comment_bot.yml
@@ -25,9 +25,9 @@ on:
       - edited
 
 jobs:
-
-  listen:
+  crossbow:
     name: Listen!
+    if: startsWith(github.event.comment.body, '@github-actions')
     runs-on: ubuntu-latest
     steps:
       - name: Checkout Arrow
@@ -53,5 +53,73 @@ jobs:
           archery trigger-bot \
             --event-name ${{ github.event_name }} \
             --event-payload ${{ github.event_path }}
-
-
+  autotune:
+    name: "Fix all the things"
+    if: startsWith(github.event.comment.body, 'autotune')
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: r-lib/actions/pr-fetch@master
+        with:
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
+      - name: See what is different
+        run: |
+          set -ex
+          git remote add upstream https://github.com/apache/arrow
+          git fetch upstream
+          changed() {
+            git diff --name-only HEAD^..upstream/master | grep -e "$1" >/dev/null 2>&1
+          }
+          if changed '^r/.*\.R$'; then
+            echo "::set-env name=R_DOCS::true"
+          fi
+          if changed 'cmake' || changed 'CMake'; then
+            echo "::set-env name=CMAKE_FORMAT::true"
+          fi
+          if changed '^cpp/src'; then
+            echo "::set-env name=CLANG_FORMAT_CPP::true"
+          fi
+          if changed '^r/src'; then
+            echo "::set-env name=CLANG_FORMAT_R::true"
+          fi
+      - name: Run cmake_format
+        if: false
+        # TODO: make this work https://issues.apache.org/jira/browse/ARROW-8489
+        # if: env.CMAKE_FORMAT == 'true' || endsWith(github.event.comment.body, 'everything')
+        run: |
+          python3 -m pip install -r dev/archery/requirements-lint.txt
+          python3 run-cmake-format.py
+      - name: Run clang-format on cpp
+        if: env.CLANG_FORMAT_CPP == 'true' || endsWith(github.event.comment.body, 'everything')
+        run: |
+          . .env # To get the clang version we use
+          cpp/build-support/run_clang_format.py \
+              --clang_format_binary=clang-format-${CLANG_TOOLS} \
+              --exclude_glob=cpp/build-support/lint_exclusions.txt \
+              --source_dir=cpp/src --quiet --fix
+      - name: Run clang-format on r
+        if: env.CLANG_FORMAT_R == 'true' || endsWith(github.event.comment.body, 'everything')
+        run: |
+          . .env # To get the clang version we use
+          cpp/build-support/run_clang_format.py \
+              --clang_format_binary=clang-format-${CLANG_TOOLS} \
+              --exclude_glob=cpp/build-support/lint_exclusions.txt \
+              --source_dir=r/src --quiet --fix
+      - uses: r-lib/actions/setup-r@v1
+        if: env.R_DOCS == 'true' || endsWith(github.event.comment.body, 'everything')
+      - name: Update R docs
+        if: env.R_DOCS == 'true' || endsWith(github.event.comment.body, 'everything')
+        shell: Rscript {0}
+        run: |
+          source("ci/etc/rprofile")
+          install.packages(c("remotes", "roxygen2"))
+          remotes::install_deps("r")
+          roxygen2::roxygenize("r")
+      - name: Commit results
+        run: |
+          git config user.name "$(git log -1 --pretty=format:%an)"
+          git config user.email "$(git log -1 --pretty=format:%ae)"
+          git commit -a -m 'Autoformat/render all the things [automated commit]' || echo "No changes to commit"
+      - uses: r-lib/actions/pr-push@master
+        with:
+          repo-token: ${{ secrets.GITHUB_TOKEN }}


[arrow] 26/28: ARROW-8523: [C++] Optimize BitmapReader

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7a77282de88ec78e807fe93447fae3ca203cc9e9
Author: Yibo Cai <yi...@arm.com>
AuthorDate: Mon Apr 20 12:58:48 2020 +0200

    ARROW-8523: [C++] Optimize BitmapReader
    
    Replacing bit offset with bit mask improves about 15% performance
    with gcc-7.5. Arm64 servers have similar performance uplift.
    clang-9 doesn't benefit from this change.
    
    Below are arrow-bit-util-benchmark(BitmapReader/8192) results.
    Comparing performance of "current code" -> "after this patch".
    
    | cpu           | gcc-7.5    | clang-9    |
    | ---           | -------    | -------    |
    | Intel E5-2650 | 118 -> 146 | 117 -> 118 |
    | Intel i7-4790 | 154 -> 191 | 155 -> 154 |
    | AMD EPYC-7251 | 119 -> 133 | 122 -> 123 |
    
    Closes #6986 from cyb70289/bitmap
    
    Authored-by: Yibo Cai <yi...@arm.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/util/bit_util.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/cpp/src/arrow/util/bit_util.h b/cpp/src/arrow/util/bit_util.h
index 68bc0b4..5b6cbf7 100644
--- a/cpp/src/arrow/util/bit_util.h
+++ b/cpp/src/arrow/util/bit_util.h
@@ -507,21 +507,21 @@ class BitmapReader {
       : bitmap_(bitmap), position_(0), length_(length) {
     current_byte_ = 0;
     byte_offset_ = start_offset / 8;
-    bit_offset_ = start_offset % 8;
+    bit_offset_mask_ = 1 << (start_offset % 8);
     if (length > 0) {
       current_byte_ = bitmap[byte_offset_];
     }
   }
 
-  bool IsSet() const { return (current_byte_ & (1 << bit_offset_)) != 0; }
+  bool IsSet() const { return (current_byte_ & bit_offset_mask_) != 0; }
 
-  bool IsNotSet() const { return (current_byte_ & (1 << bit_offset_)) == 0; }
+  bool IsNotSet() const { return (current_byte_ & bit_offset_mask_) == 0; }
 
   void Next() {
-    ++bit_offset_;
+    bit_offset_mask_ <<= 1;
     ++position_;
-    if (ARROW_PREDICT_FALSE(bit_offset_ == 8)) {
-      bit_offset_ = 0;
+    if (ARROW_PREDICT_FALSE(bit_offset_mask_ == 0)) {
+      bit_offset_mask_ = 1;
       ++byte_offset_;
       if (ARROW_PREDICT_TRUE(position_ < length_)) {
         current_byte_ = bitmap_[byte_offset_];
@@ -537,8 +537,8 @@ class BitmapReader {
   int64_t length_;
 
   uint8_t current_byte_;
+  uint8_t bit_offset_mask_;
   int64_t byte_offset_;
-  int64_t bit_offset_;
 };
 
 class BitmapWriter {


[arrow] 16/28: ARROW-8443: [Gandiva][C++] Fix Trunc and Round output types.

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8b5b8e06be2ad6785a38b8a9d03ec62d0777c7de
Author: Praveen <pr...@dremio.com>
AuthorDate: Sat Apr 18 18:18:42 2020 +0530

    ARROW-8443: [Gandiva][C++] Fix Trunc and Round output types.
    
    - Changed trunc and round to honor output precision and scale.
    - Make it a no-op if there is no change in output scale and rounding scale is positive.
    
    Closes #6942 from praveenbingo/ARROW-8443-1 and squashes the following commits:
    
    c94f60642 <Praveen> ARROW-8443:  Fix Trunc and Round output types.
    
    Authored-by: Praveen <pr...@dremio.com>
    Signed-off-by: Praveen <pr...@dremio.com>
---
 cpp/src/gandiva/precompiled/decimal_ops.cc       |  33 ++++--
 cpp/src/gandiva/precompiled/decimal_ops.h        |   7 +-
 cpp/src/gandiva/precompiled/decimal_ops_test.cc  | 123 ++++++++++++++---------
 cpp/src/gandiva/precompiled/decimal_wrapper.cc   |  10 +-
 cpp/src/gandiva/precompiled/extended_math_ops.cc |   5 +-
 5 files changed, 112 insertions(+), 66 deletions(-)

diff --git a/cpp/src/gandiva/precompiled/decimal_ops.cc b/cpp/src/gandiva/precompiled/decimal_ops.cc
index 8b39dac..03b72de 100644
--- a/cpp/src/gandiva/precompiled/decimal_ops.cc
+++ b/cpp/src/gandiva/precompiled/decimal_ops.cc
@@ -658,24 +658,35 @@ static BasicDecimal128 RoundWithNegativeScale(const BasicDecimalScalar128& x,
   return scaled + delta;
 }
 
-BasicDecimal128 Round(const BasicDecimalScalar128& x, int32_t out_scale, bool* overflow) {
-  if (out_scale < 0) {
-    return RoundWithNegativeScale(x, x.precision(), out_scale,
+BasicDecimal128 Round(const BasicDecimalScalar128& x, int32_t out_precision,
+                      int32_t out_scale, int32_t rounding_scale, bool* overflow) {
+  // no-op if target scale is same as arg scale
+  if (x.scale() == out_scale && rounding_scale >= 0) {
+    return x.value();
+  }
+
+  if (rounding_scale < 0) {
+    return RoundWithNegativeScale(x, out_precision, rounding_scale,
                                   RoundType::kRoundTypeHalfRoundUp, overflow);
   } else {
-    return RoundWithPositiveScale(x, x.precision(), out_scale,
+    return RoundWithPositiveScale(x, out_precision, rounding_scale,
                                   RoundType::kRoundTypeHalfRoundUp, overflow);
   }
 }
 
-BasicDecimal128 Truncate(const BasicDecimalScalar128& x, int32_t out_scale,
-                         bool* overflow) {
-  if (out_scale < 0) {
-    return RoundWithNegativeScale(x, x.precision(), out_scale, RoundType::kRoundTypeTrunc,
-                                  overflow);
+BasicDecimal128 Truncate(const BasicDecimalScalar128& x, int32_t out_precision,
+                         int32_t out_scale, int32_t rounding_scale, bool* overflow) {
+  // no-op if target scale is same as arg scale
+  if (x.scale() == out_scale && rounding_scale >= 0) {
+    return x.value();
+  }
+
+  if (rounding_scale < 0) {
+    return RoundWithNegativeScale(x, out_precision, rounding_scale,
+                                  RoundType::kRoundTypeTrunc, overflow);
   } else {
-    return RoundWithPositiveScale(x, x.precision(), out_scale, RoundType::kRoundTypeTrunc,
-                                  overflow);
+    return RoundWithPositiveScale(x, out_precision, rounding_scale,
+                                  RoundType::kRoundTypeTrunc, overflow);
   }
 }
 
diff --git a/cpp/src/gandiva/precompiled/decimal_ops.h b/cpp/src/gandiva/precompiled/decimal_ops.h
index b342943..292dce2 100644
--- a/cpp/src/gandiva/precompiled/decimal_ops.h
+++ b/cpp/src/gandiva/precompiled/decimal_ops.h
@@ -73,11 +73,12 @@ BasicDecimal128 Convert(const BasicDecimalScalar128& x, int32_t out_precision,
                         int32_t out_scale, bool* overflow);
 
 /// round decimal.
-BasicDecimal128 Round(const BasicDecimalScalar128& x, int32_t out_scale, bool* overflow);
+BasicDecimal128 Round(const BasicDecimalScalar128& x, int32_t out_precision,
+                      int32_t out_scale, int32_t rounding_scale, bool* overflow);
 
 /// truncate decimal.
-BasicDecimal128 Truncate(const BasicDecimalScalar128& x, int32_t out_scale,
-                         bool* overflow);
+BasicDecimal128 Truncate(const BasicDecimalScalar128& x, int32_t out_precision,
+                         int32_t out_scale, int32_t rounding_scale, bool* overflow);
 
 /// ceil decimal
 BasicDecimal128 Ceil(const BasicDecimalScalar128& x, bool* overflow);
diff --git a/cpp/src/gandiva/precompiled/decimal_ops_test.cc b/cpp/src/gandiva/precompiled/decimal_ops_test.cc
index 3bc77a9..be8a1fe 100644
--- a/cpp/src/gandiva/precompiled/decimal_ops_test.cc
+++ b/cpp/src/gandiva/precompiled/decimal_ops_test.cc
@@ -552,54 +552,70 @@ TEST_F(TestDecimalSql, Compare) {
 
 TEST_F(TestDecimalSql, Round) {
   // expected, input, rounding_scale, overflow
-  using TupleType = std::tuple<BasicDecimal128, DecimalScalar128, int32_t, bool>;
+  using TupleType = std::tuple<DecimalScalar128, DecimalScalar128, int32_t, bool>;
   std::vector<TupleType> test_values = {
       // examples from
       // https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_round
-      std::make_tuple(BasicDecimal128{-1}, DecimalScalar128{-123, 38, 2}, 0, false),
-      std::make_tuple(BasicDecimal128{-2}, DecimalScalar128{-158, 38, 2}, 0, false),
-      std::make_tuple(BasicDecimal128{2}, DecimalScalar128{158, 38, 2}, 0, false),
-      std::make_tuple(BasicDecimal128{-13}, DecimalScalar128{-1298, 38, 3}, 1, false),
-      std::make_tuple(BasicDecimal128{-1}, DecimalScalar128{-1298, 38, 3}, 0, false),
-      std::make_tuple(BasicDecimal128{20}, DecimalScalar128{23298, 38, 3}, -1, false),
-      std::make_tuple(BasicDecimal128{3}, DecimalScalar128{25, 38, 1}, 0, false),
+      std::make_tuple(DecimalScalar128{-1, 36, 0}, DecimalScalar128{-123, 38, 2}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{-2, 36, 0}, DecimalScalar128{-158, 38, 2}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{2, 36, 0}, DecimalScalar128{158, 38, 2}, 0, false),
+      std::make_tuple(DecimalScalar128{-13, 36, 1}, DecimalScalar128{-1298, 38, 3}, 1,
+                      false),
+      std::make_tuple(DecimalScalar128{-1, 35, 0}, DecimalScalar128{-1298, 38, 3}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{20, 35, 0}, DecimalScalar128{23298, 38, 3}, -1,
+                      false),
+      std::make_tuple(DecimalScalar128{100, 38, 0}, DecimalScalar128{122, 38, 0}, -2,
+                      false),
+      std::make_tuple(DecimalScalar128{3, 37, 0}, DecimalScalar128{25, 38, 1}, 0, false),
 
       // border cases
-      std::make_tuple(BasicDecimal128{INT64_MIN / 100},
+      std::make_tuple(DecimalScalar128{INT64_MIN / 100, 36, 0},
                       DecimalScalar128{INT64_MIN, 38, 2}, 0, false),
 
-      std::make_tuple(INT64_MIN, DecimalScalar128{INT64_MIN, 38, 0}, 0, false),
-      std::make_tuple(BasicDecimal128{0, 0}, DecimalScalar128{0, 0, 38, 2}, 0, false),
-      std::make_tuple(INT64_MAX, DecimalScalar128{INT64_MAX, 38, 0}, 0, false),
+      std::make_tuple(DecimalScalar128{INT64_MIN, 38, 0},
+                      DecimalScalar128{INT64_MIN, 38, 0}, 0, false),
+      std::make_tuple(DecimalScalar128{0, 0, 36, 0}, DecimalScalar128{0, 0, 38, 2}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{INT64_MAX, 38, 0},
+                      DecimalScalar128{INT64_MAX, 38, 0}, 0, false),
 
-      std::make_tuple(BasicDecimal128(INT64_MAX / 100),
+      std::make_tuple(DecimalScalar128{INT64_MAX / 100, 36, 0},
                       DecimalScalar128{INT64_MAX, 38, 2}, 0, false),
 
       // large scales
-      std::make_tuple(BasicDecimal128{0, 0}, DecimalScalar128{12345, 38, 16}, 0, false),
+      std::make_tuple(DecimalScalar128{0, 0, 22, 0}, DecimalScalar128{12345, 38, 16}, 0,
+                      false),
+
       std::make_tuple(
-          BasicDecimal128{124},
+          DecimalScalar128{BasicDecimal128{124}, 22, 0},
           DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(14), 38, 16}, 0, false),
       std::make_tuple(
-          BasicDecimal128{-124},
+          DecimalScalar128{BasicDecimal128{-124}, 22, 0},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(14), 38, 16}, 0,
           false),
       std::make_tuple(
-          BasicDecimal128{124},
+          DecimalScalar128{BasicDecimal128{124}, 6, 0},
           DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(30), 38, 32}, 0, false),
       std::make_tuple(
-          BasicDecimal128{-124},
+          DecimalScalar128{BasicDecimal128{-124}, 6, 0},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(30), 38, 32}, 0,
           false),
 
-      // overflow
+      // scale bigger than arg
       std::make_tuple(
-          BasicDecimal128{0, 0},
-          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32}, 35, true),
+          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32},
+          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32}, 35,
+          false),
       std::make_tuple(
-          BasicDecimal128{0, 0},
+          DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(32), 38, 32},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(32), 38, 32}, 35,
-          true),
+          false),
+
+      // overflow
+      std::make_tuple(DecimalScalar128{0, 0, 1, 0}, DecimalScalar128{99, 2, 1}, 0, true),
   };
 
   for (auto iter : test_values) {
@@ -609,7 +625,9 @@ TEST_F(TestDecimalSql, Round) {
     auto expected_overflow = std::get<3>(iter);
     bool overflow = false;
 
-    EXPECT_EQ(expected, decimalops::Round(input, rounding_scale, &overflow))
+    EXPECT_EQ(expected.value(),
+              decimalops::Round(input, expected.precision(), expected.scale(),
+                                rounding_scale, &overflow))
         << "  failed on input " << input << "  rounding scale " << rounding_scale;
     if (expected_overflow) {
       ASSERT_TRUE(overflow) << "overflow expected for input " << input;
@@ -621,53 +639,64 @@ TEST_F(TestDecimalSql, Round) {
 
 TEST_F(TestDecimalSql, Truncate) {
   // expected, input, rounding_scale, overflow
-  using TupleType = std::tuple<BasicDecimal128, DecimalScalar128, int32_t, bool>;
+  using TupleType = std::tuple<DecimalScalar128, DecimalScalar128, int32_t, bool>;
   std::vector<TupleType> test_values = {
       // examples from
       // https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_truncate
-      std::make_tuple(BasicDecimal128{12}, DecimalScalar128{1223, 38, 3}, 1, false),
-      std::make_tuple(BasicDecimal128{19}, DecimalScalar128{1999, 38, 3}, 1, false),
-      std::make_tuple(BasicDecimal128{1}, DecimalScalar128{1999, 38, 3}, 0, false),
-      std::make_tuple(BasicDecimal128{-19}, DecimalScalar128{-1999, 38, 3}, 1, false),
-      std::make_tuple(BasicDecimal128{100}, DecimalScalar128{122, 38, 0}, -2, false),
-      std::make_tuple(BasicDecimal128{1028}, DecimalScalar128{1028, 38, 0}, 0, false),
+      std::make_tuple(DecimalScalar128{12, 36, 1}, DecimalScalar128{1223, 38, 3}, 1,
+                      false),
+      std::make_tuple(DecimalScalar128{19, 36, 1}, DecimalScalar128{1999, 38, 3}, 1,
+                      false),
+      std::make_tuple(DecimalScalar128{1, 35, 0}, DecimalScalar128{1999, 38, 3}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{-19, 36, 1}, DecimalScalar128{-1999, 38, 3}, 1,
+                      false),
+      std::make_tuple(DecimalScalar128{100, 38, 0}, DecimalScalar128{122, 38, 0}, -2,
+                      false),
+      std::make_tuple(DecimalScalar128{1028, 38, 0}, DecimalScalar128{1028, 38, 0}, 0,
+                      false),
 
       // border cases
-      std::make_tuple(BasicDecimal128{INT64_MIN / 100},
+      std::make_tuple(DecimalScalar128{BasicDecimal128{INT64_MIN / 100}, 36, 0},
                       DecimalScalar128{INT64_MIN, 38, 2}, 0, false),
 
-      std::make_tuple(INT64_MIN, DecimalScalar128{INT64_MIN, 38, 0}, 0, false),
-      std::make_tuple(BasicDecimal128{0, 0}, DecimalScalar128{0, 0, 38, 2}, 0, false),
-      std::make_tuple(INT64_MAX, DecimalScalar128{INT64_MAX, 38, 0}, 0, false),
+      std::make_tuple(DecimalScalar128{INT64_MIN, 38, 0},
+                      DecimalScalar128{INT64_MIN, 38, 0}, 0, false),
+      std::make_tuple(DecimalScalar128{0, 0, 38, 0}, DecimalScalar128{0, 0, 38, 2}, 0,
+                      false),
+      std::make_tuple(DecimalScalar128{INT64_MAX, 38, 0},
+                      DecimalScalar128{INT64_MAX, 38, 0}, 0, false),
 
-      std::make_tuple(BasicDecimal128(INT64_MAX / 100),
+      std::make_tuple(DecimalScalar128{BasicDecimal128(INT64_MAX / 100), 36, 0},
                       DecimalScalar128{INT64_MAX, 38, 2}, 0, false),
 
       // large scales
-      std::make_tuple(BasicDecimal128{0, 0}, DecimalScalar128{12345, 38, 16}, 0, false),
+      std::make_tuple(DecimalScalar128{BasicDecimal128{0, 0}, 22, 0},
+                      DecimalScalar128{12345, 38, 16}, 0, false),
       std::make_tuple(
-          BasicDecimal128{123},
+          DecimalScalar128{BasicDecimal128{123}, 22, 0},
           DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(14), 38, 16}, 0, false),
       std::make_tuple(
-          BasicDecimal128{-123},
+          DecimalScalar128{BasicDecimal128{-123}, 22, 0},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(14), 38, 16}, 0,
           false),
       std::make_tuple(
-          BasicDecimal128{123},
+          DecimalScalar128{BasicDecimal128{123}, 6, 0},
           DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(30), 38, 32}, 0, false),
       std::make_tuple(
-          BasicDecimal128{-123},
+          DecimalScalar128{BasicDecimal128{-123}, 6, 0},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(30), 38, 32}, 0,
           false),
 
       // overflow
       std::make_tuple(
-          BasicDecimal128{0, 0},
-          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32}, 35, true),
+          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32},
+          DecimalScalar128{BasicDecimal128{12389}.IncreaseScaleBy(32), 38, 32}, 35,
+          false),
       std::make_tuple(
-          BasicDecimal128{0, 0},
+          DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(32), 38, 32},
           DecimalScalar128{BasicDecimal128{-12389}.IncreaseScaleBy(32), 38, 32}, 35,
-          true),
+          false),
   };
 
   for (auto iter : test_values) {
@@ -677,7 +706,9 @@ TEST_F(TestDecimalSql, Truncate) {
     auto expected_overflow = std::get<3>(iter);
     bool overflow = false;
 
-    EXPECT_EQ(expected, decimalops::Truncate(input, rounding_scale, &overflow))
+    EXPECT_EQ(expected.value(),
+              decimalops::Truncate(input, expected.precision(), expected.scale(),
+                                   rounding_scale, &overflow))
         << "  failed on input " << input << "  rounding scale " << rounding_scale;
     if (expected_overflow) {
       ASSERT_TRUE(overflow) << "overflow expected for input " << input;
diff --git a/cpp/src/gandiva/precompiled/decimal_wrapper.cc b/cpp/src/gandiva/precompiled/decimal_wrapper.cc
index 80d4832..082d583 100644
--- a/cpp/src/gandiva/precompiled/decimal_wrapper.cc
+++ b/cpp/src/gandiva/precompiled/decimal_wrapper.cc
@@ -137,7 +137,7 @@ void round_decimal128(int64_t x_high, uint64_t x_low, int32_t x_precision,
   gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale);
 
   bool overflow = false;
-  auto out = gandiva::decimalops::Round(x, 0, &overflow);
+  auto out = gandiva::decimalops::Round(x, out_precision, 0, 0, &overflow);
   *out_high = out.high_bits();
   *out_low = out.low_bits();
 }
@@ -150,7 +150,8 @@ void round_decimal128_int32(int64_t x_high, uint64_t x_low, int32_t x_precision,
   gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale);
 
   bool overflow = false;
-  auto out = gandiva::decimalops::Round(x, rounding_scale, &overflow);
+  auto out =
+      gandiva::decimalops::Round(x, out_precision, out_scale, rounding_scale, &overflow);
   *out_high = out.high_bits();
   *out_low = out.low_bits();
 }
@@ -162,7 +163,7 @@ void truncate_decimal128(int64_t x_high, uint64_t x_low, int32_t x_precision,
   gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale);
 
   bool overflow = false;
-  auto out = gandiva::decimalops::Truncate(x, 0, &overflow);
+  auto out = gandiva::decimalops::Truncate(x, out_precision, 0, 0, &overflow);
   *out_high = out.high_bits();
   *out_low = out.low_bits();
 }
@@ -175,7 +176,8 @@ void truncate_decimal128_int32(int64_t x_high, uint64_t x_low, int32_t x_precisi
   gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale);
 
   bool overflow = false;
-  auto out = gandiva::decimalops::Truncate(x, rounding_scale, &overflow);
+  auto out = gandiva::decimalops::Truncate(x, out_precision, out_scale, rounding_scale,
+                                           &overflow);
   *out_high = out.high_bits();
   *out_low = out.low_bits();
 }
diff --git a/cpp/src/gandiva/precompiled/extended_math_ops.cc b/cpp/src/gandiva/precompiled/extended_math_ops.cc
index e6b6a6e..78a3993 100644
--- a/cpp/src/gandiva/precompiled/extended_math_ops.cc
+++ b/cpp/src/gandiva/precompiled/extended_math_ops.cc
@@ -115,8 +115,9 @@ FORCE_INLINE
 gdv_int64 truncate_int64_int32(gdv_int64 in, gdv_int32 out_scale) {
   bool overflow = false;
   arrow::BasicDecimal128 decimal = gandiva::decimalops::FromInt64(in, 38, 0, &overflow);
-  arrow::BasicDecimal128 decimal_with_outscale = gandiva::decimalops::Truncate(
-      gandiva::BasicDecimalScalar128(decimal, 38, 0), out_scale, &overflow);
+  arrow::BasicDecimal128 decimal_with_outscale =
+      gandiva::decimalops::Truncate(gandiva::BasicDecimalScalar128(decimal, 38, 0), 38,
+                                    out_scale, out_scale, &overflow);
   if (out_scale < 0) {
     out_scale = 0;
   }


[arrow] 08/28: PARQUET-1843: [C++] Drop duplicated assignment

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c34fa08535165177923b328acf70f51b83e53302
Author: Kazuaki Ishizaki <is...@jp.ibm.com>
AuthorDate: Fri Apr 17 12:04:49 2020 +0900

    PARQUET-1843: [C++] Drop duplicated assignment
    
    This PR drops one of the duplicated assignments. While it is functionally correct, it is inefficient.
    
    ```
       int DecodeIndices(int num_values, arrow::ArrayBuilder* builder) override {
         num_values = std::min(num_values, num_values_);
         num_values = std::min(num_values, num_values_);
         if (num_values > 0) {
    ```
    
    Closes #6960 from kiszk/PARQUET-1843
    
    Authored-by: Kazuaki Ishizaki <is...@jp.ibm.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 cpp/src/parquet/encoding.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cpp/src/parquet/encoding.cc b/cpp/src/parquet/encoding.cc
index f7df986..ec6a3de 100644
--- a/cpp/src/parquet/encoding.cc
+++ b/cpp/src/parquet/encoding.cc
@@ -1554,7 +1554,6 @@ class DictDecoderImpl : public DecoderImpl, virtual public DictDecoder<Type> {
 
   int DecodeIndices(int num_values, arrow::ArrayBuilder* builder) override {
     num_values = std::min(num_values, num_values_);
-    num_values = std::min(num_values, num_values_);
     if (num_values > 0) {
       // TODO(wesm): Refactor to batch reads for improved memory use. This is
       // relatively simple here because we don't have to do any bookkeeping of


[arrow] 21/28: ARROW-8517: [Release] Update Crossbow release verification tasks for 0.17.0 RC0

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 84e3f19fde3c4a9ce688d093bc76eddc17d8c0c2
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Sun Apr 19 15:54:50 2020 -0500

    ARROW-8517: [Release] Update Crossbow release verification tasks for 0.17.0 RC0
    
    Closes #6961 from nealrichardson/verify-rc-0.17.0-0
    
    Lead-authored-by: Neal Richardson <ne...@gmail.com>
    Co-authored-by: Sutou Kouhei <ko...@clear-code.com>
    Co-authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Wes McKinney <we...@apache.org>
---
 dev/release/verify-release-candidate.sh       | 38 ++++++++++++++++-----------
 dev/tasks/tasks.yml                           | 25 ++++++++++++++++--
 dev/tasks/verify-rc/github.nix.yml            | 16 +++++++----
 dev/tasks/verify-rc/github.windows.source.yml |  2 +-
 dev/tasks/verify-rc/github.windows.wheels.yml |  2 +-
 5 files changed, 59 insertions(+), 24 deletions(-)

diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 7961f2d..a6de4ff 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -127,7 +127,9 @@ test_binary() {
   local download_dir=binaries
   mkdir -p ${download_dir}
 
-  python $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER --dest=${download_dir}
+  python $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER \
+         --dest=${download_dir}
+
   verify_dir_artifact_signatures ${download_dir}
 }
 
@@ -646,6 +648,7 @@ test_linux_wheels() {
     local env=_verify_wheel-${py_arch}
     conda create -yq -n ${env} python=${py_arch//[mu]/}
     conda activate ${env}
+    pip install -U pip
 
     for ml_spec in ${manylinuxes}; do
       # check the mandatory and optional imports
@@ -668,6 +671,7 @@ test_macos_wheels() {
     local env=_verify_wheel-${py_arch}
     conda create -yq -n ${env} python=${py_arch//m/}
     conda activate ${env}
+    pip install -U pip
 
     macos_suffix=macosx
     case "${py_arch}" in
@@ -703,9 +707,6 @@ test_wheels() {
     local filter_regex=.*manylinux.*
   fi
 
-  conda create -yq -n py3-base python=3.7
-  conda activate py3-base
-
   python $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER \
          --regex=${filter_regex} \
          --dest=${download_dir}
@@ -726,9 +727,17 @@ test_wheels() {
 # By default test all functionalities.
 # To deactivate one test, deactivate the test and all of its dependents
 # To explicitly select one test, set TEST_DEFAULT=0 TEST_X=1
+
 if [ "${ARTIFACT}" == "source" ]; then
-  TEST_SOURCE=1
+  : ${TEST_SOURCE:=1}
+elif [ "${ARTIFACT}" == "wheels" ]; then
+  TEST_WHEELS=1
+else
+  TEST_BINARY_DISTRIBUTIONS=1
 fi
+: ${TEST_SOURCE:=0}
+: ${TEST_WHEELS:=0}
+: ${TEST_BINARY_DISTRIBUTIONS:=0}
 
 : ${TEST_DEFAULT:=1}
 : ${TEST_JAVA:=${TEST_DEFAULT}}
@@ -741,9 +750,14 @@ fi
 : ${TEST_GO:=${TEST_DEFAULT}}
 : ${TEST_RUST:=${TEST_DEFAULT}}
 : ${TEST_INTEGRATION:=${TEST_DEFAULT}}
-: ${TEST_BINARY:=${TEST_DEFAULT}}
-: ${TEST_APT:=${TEST_DEFAULT}}
-: ${TEST_YUM:=${TEST_DEFAULT}}
+if [ ${TEST_BINARY_DISTRIBUTIONS} -gt 0 ]; then
+  TEST_BINARY_DISTRIBUTIONS_DEFAULT=${TEST_DEFAULT}
+else
+  TEST_BINARY_DISTRIBUTIONS_DEFAULT=0
+fi
+: ${TEST_BINARY:=${TEST_BINARY_DISTRIBUTIONS_DEFAULT}}
+: ${TEST_APT:=${TEST_BINARY_DISTRIBUTIONS_DEFAULT}}
+: ${TEST_YUM:=${TEST_BINARY_DISTRIBUTIONS_DEFAULT}}
 
 # For selective Integration testing, set TEST_DEFAULT=0 TEST_INTEGRATION_X=1 TEST_INTEGRATION_Y=1
 : ${TEST_INTEGRATION_CPP:=${TEST_INTEGRATION}}
@@ -759,13 +773,7 @@ TEST_JS=$((${TEST_JS} + ${TEST_INTEGRATION_JS}))
 TEST_GO=$((${TEST_GO} + ${TEST_INTEGRATION_GO}))
 TEST_INTEGRATION=$((${TEST_INTEGRATION} + ${TEST_INTEGRATION_CPP} + ${TEST_INTEGRATION_JAVA} + ${TEST_INTEGRATION_JS} + ${TEST_INTEGRATION_GO}))
 
-if [ "${ARTIFACT}" == "wheels" ]; then
-  TEST_WHEELS=1
-else
-  TEST_WHEELS=0
-fi
-
-NEED_MINICONDA=$((${TEST_CPP} + ${TEST_WHEELS} + ${TEST_INTEGRATION}))
+NEED_MINICONDA=$((${TEST_CPP} + ${TEST_WHEELS} + ${TEST_BINARY} + ${TEST_INTEGRATION}))
 
 : ${TEST_ARCHIVE:=apache-arrow-${VERSION}.tar.gz}
 case "${TEST_ARCHIVE}" in
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index dc2215f..e4f3331 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -76,6 +76,9 @@ groups:
   verify-rc:
     - verify-rc-*
 
+  verify-rc-binaries:
+    - verify-rc-binaries-*
+
   verify-rc-wheels:
     - verify-rc-wheels-*
 
@@ -1420,14 +1423,32 @@ tasks:
 
   ########################### Release verification ############################
 
-  verify-rc-binaries:
+  verify-rc-binaries-binary:
     ci: github
     platform: linux
     template: verify-rc/github.nix.yml
     params:
       os: "ubuntu"
       artifact: "binaries"
-      flag: ""
+      flag: "TEST_BINARY=1"
+
+  verify-rc-binaries-apt:
+    ci: github
+    platform: linux
+    template: verify-rc/github.nix.yml
+    params:
+      os: "ubuntu"
+      artifact: "binaries"
+      flag: "TEST_APT=1"
+
+  verify-rc-binaries-yum:
+    ci: github
+    platform: linux
+    template: verify-rc/github.nix.yml
+    params:
+      os: "ubuntu"
+      artifact: "binaries"
+      flag: "TEST_YUM=1"
 
   verify-rc-wheels-linux:
     ci: github
diff --git a/dev/tasks/verify-rc/github.nix.yml b/dev/tasks/verify-rc/github.nix.yml
index df26a7f..09455ee 100644
--- a/dev/tasks/verify-rc/github.nix.yml
+++ b/dev/tasks/verify-rc/github.nix.yml
@@ -45,12 +45,17 @@ jobs:
 
           {{ flag }}
           if [ $(uname) = "Darwin" ]; then
-            brew install llvm@7 thrift glib
+            brew update
+            brew bundle --file=arrow/cpp/Brewfile
+            brew bundle --file=arrow/c_glib/Brewfile
+            if [ "$TEST_PYTHON" = "1" ]; then
+              # https://stackoverflow.com/questions/56083725/macos-build-issues-lstdc-not-found-while-building-python-package
+              export MACOSX_DEPLOYMENT_TARGET=10.9
+            fi
           else
             # TODO: don't require removing newer llvms
-            sudo apt-get --purge remove -y llvm-8 llvm-9 clang-8 clang-9
+            sudo apt-get --purge remove -y llvm-9 clang-9
             sudo apt-get install -y \
-              llvm-7 clang-7 \
               wget curl libboost-all-dev jq \
               autoconf-archive gtk-doc-tools libgirepository1.0-dev flex bison
             if [ "$TEST_JAVA" = "1" ]; then
@@ -64,8 +69,9 @@ jobs:
             fi
             if [ "$TEST_RUBY" = "1" ]; then
               ruby --version
+              sudo gem install bundler
             fi
           fi
-          # TODO: put 0.16.0 2 in some separate file?
+          # TODO: put version and rc number in some separate file?
           # If you edit the versions, be sure to edit the other workflow files in this directory too
-          TEST_DEFAULT=0 {{ flag }} arrow/dev/release/verify-release-candidate.sh {{ artifact }} 0.16.0 2
+          TEST_DEFAULT=0 {{ flag }} arrow/dev/release/verify-release-candidate.sh {{ artifact }} 0.17.0 0
diff --git a/dev/tasks/verify-rc/github.windows.source.yml b/dev/tasks/verify-rc/github.windows.source.yml
index ac343ad..d236bb0 100644
--- a/dev/tasks/verify-rc/github.windows.source.yml
+++ b/dev/tasks/verify-rc/github.windows.source.yml
@@ -46,4 +46,4 @@ jobs:
           choco install wget
           cd arrow
           # If you edit the versions, be sure to edit the other workflow files in this directory too
-          dev/release/verify-release-candidate.bat 0.16.0 2
+          dev/release/verify-release-candidate.bat 0.17.0 0
diff --git a/dev/tasks/verify-rc/github.windows.wheels.yml b/dev/tasks/verify-rc/github.windows.wheels.yml
index 5ae83f2..082c2aa 100644
--- a/dev/tasks/verify-rc/github.windows.wheels.yml
+++ b/dev/tasks/verify-rc/github.windows.wheels.yml
@@ -45,4 +45,4 @@ jobs:
           choco install wget
           cd arrow
           # If you edit the versions, be sure to edit the other workflow files in this directory too
-          dev/release/verify-release-candidate-wheels.bat 0.16.0 2
+          dev/release/verify-release-candidate-wheels.bat 0.17.0 0


[arrow] 25/28: ARROW-8526: [Python] Fix non-deterministic row order failure in dataset tests

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6468d3743492278b466831bd8627a34bca66bd1b
Author: Joris Van den Bossche <jo...@gmail.com>
AuthorDate: Mon Apr 20 11:41:33 2020 +0200

    ARROW-8526: [Python] Fix non-deterministic row order failure in dataset tests
    
    Closes #6989 from jorisvandenbossche/ARROW-8414-bis-bis
    
    Authored-by: Joris Van den Bossche <jo...@gmail.com>
    Signed-off-by: Krisztián Szűcs <sz...@gmail.com>
---
 python/pyarrow/tests/test_dataset.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyarrow/tests/test_dataset.py b/python/pyarrow/tests/test_dataset.py
index d67a6b5..8d0a21e 100644
--- a/python/pyarrow/tests/test_dataset.py
+++ b/python/pyarrow/tests/test_dataset.py
@@ -981,7 +981,7 @@ def test_construct_from_list_of_files(tempdir):
     relative_paths = [p.relative_to(tempdir) for p in paths]
     with change_cwd(tempdir):
         d1 = ds.dataset(relative_paths)
-        t1 = d1.to_table()
+        t1 = d1.to_table(use_threads=False)
         assert len(t1) == sum(map(len, tables))
 
     d2 = ds.dataset(relative_paths, filesystem=_filesystem_uri(tempdir))


[arrow] 28/28: ARROW-8477: [C++] Enable reading and writing of long filenames for Windows

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5093b809d63ac8db99aec9caa7ad7e723f277c46
Author: TP Boudreau <tp...@gmail.com>
AuthorDate: Mon Apr 20 21:03:40 2020 +0200

    ARROW-8477: [C++] Enable reading and writing of long filenames for Windows
    
    This patch enables reading/writing of files with long (>260 characters) pathnames in Windows.
    
    In order for the new test to run under Windows, both (1) the test host must have long paths enabled in its registry, and (2) the test executable (arrow_utility_test.exe) must include a manifest indicating support for long paths (see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#enable-long-paths-in-windows-10-version-1607-and-later).  The test source code checks for (1) and the cmake file changes ensure (2).
    
    Closes #6993 from tpboudreau/ARROW-8477
    
    Lead-authored-by: TP Boudreau <tp...@gmail.com>
    Co-authored-by: Antoine Pitrou <an...@python.org>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 .github/workflows/cpp.yml                |  4 ++-
 cpp/src/arrow/util/CMakeLists.txt        | 14 +++++++-
 cpp/src/arrow/util/io_util.cc            | 40 +++++++++++++++++----
 cpp/src/arrow/util/io_util_test.cc       | 60 ++++++++++++++++++++++++++++++++
 cpp/src/arrow/util/io_util_test.manifest | 39 +++++++++++++++++++++
 cpp/src/arrow/util/io_util_test.rc       | 44 +++++++++++++++++++++++
 6 files changed, 192 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index 287c0a5..a4db36f 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -228,7 +228,9 @@ jobs:
         run: ci/scripts/util_checkout.sh
       - name: Build
         shell: bash
-        run: ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
+        run: |
+          export BOOST_ROOT=$BOOST_ROOT_1_72_0
+          ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
       - name: Test
         shell: bash
         run: ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
diff --git a/cpp/src/arrow/util/CMakeLists.txt b/cpp/src/arrow/util/CMakeLists.txt
index 4c2ed4e..ce08839 100644
--- a/cpp/src/arrow/util/CMakeLists.txt
+++ b/cpp/src/arrow/util/CMakeLists.txt
@@ -26,6 +26,18 @@ arrow_install_all_headers("arrow/util")
 # arrow_test_main
 #
 
+if(WIN32)
+  # This manifest enables long file paths on Windows 10+
+  # See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later
+  if(MSVC)
+    set(IO_UTIL_TEST_SOURCES io_util_test.cc io_util_test.manifest)
+  else()
+    set(IO_UTIL_TEST_SOURCES io_util_test.cc io_util_test.rc)
+  endif()
+else()
+  set(IO_UTIL_TEST_SOURCES io_util_test.cc)
+endif()
+
 add_arrow_test(utility-test
                SOURCES
                align_util_test.cc
@@ -37,7 +49,7 @@ add_arrow_test(utility-test
                key_value_metadata_test.cc
                hashing_test.cc
                int_util_test.cc
-               io_util_test.cc
+               ${IO_UTIL_TEST_SOURCES}
                iterator_test.cc
                logging_test.cc
                parsing_util_test.cc
diff --git a/cpp/src/arrow/util/io_util.cc b/cpp/src/arrow/util/io_util.cc
index c7efa15..2e589fd 100644
--- a/cpp/src/arrow/util/io_util.cc
+++ b/cpp/src/arrow/util/io_util.cc
@@ -837,8 +837,19 @@ Result<int> FileOpenReadable(const PlatformFilename& file_name) {
   int fd, errno_actual;
 #if defined(_WIN32)
   SetLastError(0);
-  errno_actual = _wsopen_s(&fd, file_name.ToNative().c_str(),
-                           _O_RDONLY | _O_BINARY | _O_NOINHERIT, _SH_DENYNO, _S_IREAD);
+  HANDLE file_handle = CreateFileW(file_name.ToNative().c_str(), GENERIC_READ,
+                                   FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+                                   OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
+  DWORD last_error = GetLastError();
+  if (last_error == ERROR_SUCCESS) {
+    errno_actual = 0;
+    fd = _open_osfhandle(reinterpret_cast<intptr_t>(file_handle),
+                         _O_RDONLY | _O_BINARY | _O_NOINHERIT);
+  } else {
+    return IOErrorFromWinError(last_error, "Failed to open local file '",
+                               file_name.ToString(), "'");
+  }
 #else
   fd = open(file_name.ToNative().c_str(), O_RDONLY);
   errno_actual = errno;
@@ -868,23 +879,38 @@ Result<int> FileOpenWritable(const PlatformFilename& file_name, bool write_only,
 #if defined(_WIN32)
   SetLastError(0);
   int oflag = _O_CREAT | _O_BINARY | _O_NOINHERIT;
-  int pmode = _S_IREAD | _S_IWRITE;
+  DWORD desired_access = GENERIC_WRITE;
+  DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+  DWORD creation_disposition = OPEN_ALWAYS;
 
-  if (truncate) {
-    oflag |= _O_TRUNC;
-  }
   if (append) {
     oflag |= _O_APPEND;
   }
 
+  if (truncate) {
+    oflag |= _O_TRUNC;
+    creation_disposition = CREATE_ALWAYS;
+  }
+
   if (write_only) {
     oflag |= _O_WRONLY;
   } else {
     oflag |= _O_RDWR;
+    desired_access |= GENERIC_READ;
   }
 
-  errno_actual = _wsopen_s(&fd, file_name.ToNative().c_str(), oflag, _SH_DENYNO, pmode);
+  HANDLE file_handle =
+      CreateFileW(file_name.ToNative().c_str(), desired_access, share_mode, NULL,
+                  creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL);
 
+  DWORD last_error = GetLastError();
+  if (last_error == ERROR_SUCCESS || last_error == ERROR_ALREADY_EXISTS) {
+    errno_actual = 0;
+    fd = _open_osfhandle(reinterpret_cast<intptr_t>(file_handle), oflag);
+  } else {
+    return IOErrorFromWinError(last_error, "Failed to open local file '",
+                               file_name.ToString(), "'");
+  }
 #else
   int oflag = O_CREAT;
 
diff --git a/cpp/src/arrow/util/io_util_test.cc b/cpp/src/arrow/util/io_util_test.cc
index eb6ed0d..b432d33 100644
--- a/cpp/src/arrow/util/io_util_test.cc
+++ b/cpp/src/arrow/util/io_util_test.cc
@@ -394,6 +394,10 @@ TEST(DeleteDirContents, Basics) {
 #else
   ASSERT_EQ(ErrnoFromStatus(status), ENOENT);
 #endif
+
+  // Now actually delete the test directory
+  ASSERT_OK_AND_ASSIGN(deleted, DeleteDirTree(parent));
+  ASSERT_TRUE(deleted);
 }
 
 TEST(TemporaryDir, Basics) {
@@ -523,5 +527,61 @@ TEST(DeleteFile, Basics) {
   ASSERT_RAISES(IOError, DeleteFile(fn));
 }
 
+#ifndef __APPLE__
+TEST(FileUtils, LongPaths) {
+  // ARROW-8477: check using long file paths under Windows (> 260 characters).
+  bool created, deleted;
+#ifdef _WIN32
+  const char* kRegKeyName = R"(SYSTEM\CurrentControlSet\Control\FileSystem)";
+  const char* kRegValueName = "LongPathsEnabled";
+  DWORD value = 0;
+  DWORD size = sizeof(value);
+  LSTATUS status = RegGetValueA(HKEY_LOCAL_MACHINE, kRegKeyName, kRegValueName,
+                                RRF_RT_REG_DWORD, NULL, &value, &size);
+  bool test_long_paths = (status == ERROR_SUCCESS && value == 1);
+  if (!test_long_paths) {
+    ARROW_LOG(WARNING)
+        << "Tests for accessing files with long path names have been disabled. "
+        << "To enable these tests, set the value of " << kRegValueName
+        << " in registry key \\HKEY_LOCAL_MACHINE\\" << kRegKeyName
+        << " to 1 on the test host.";
+    return;
+  }
+#endif
+
+  const std::string BASE = "xxx-io-util-test-dir-long";
+  PlatformFilename base_path, long_path, long_filename;
+  int fd = -1;
+  std::stringstream fs;
+  fs << BASE;
+  for (int i = 0; i < 64; ++i) {
+    fs << "/123456789ABCDEF";
+  }
+  ASSERT_OK_AND_ASSIGN(base_path,
+                       PlatformFilename::FromString(BASE));  // long_path length > 1024
+  ASSERT_OK_AND_ASSIGN(
+      long_path, PlatformFilename::FromString(fs.str()));  // long_path length > 1024
+  ASSERT_OK_AND_ASSIGN(created, CreateDirTree(long_path));
+  ASSERT_TRUE(created);
+  AssertExists(long_path);
+  ASSERT_OK_AND_ASSIGN(long_filename,
+                       PlatformFilename::FromString(fs.str() + "/file.txt"));
+  ASSERT_OK_AND_ASSIGN(fd, FileOpenWritable(long_filename));
+  ASSERT_OK(FileClose(fd));
+  AssertExists(long_filename);
+  fd = -1;
+  ASSERT_OK_AND_ASSIGN(fd, FileOpenReadable(long_filename));
+  ASSERT_OK(FileClose(fd));
+  ASSERT_OK_AND_ASSIGN(deleted, DeleteDirContents(long_path));
+  ASSERT_TRUE(deleted);
+  ASSERT_OK_AND_ASSIGN(deleted, DeleteDirTree(long_path));
+  ASSERT_TRUE(deleted);
+
+  // Now delete the whole test directory tree
+  ASSERT_OK_AND_ASSIGN(deleted, DeleteDirTree(base_path));
+  ASSERT_TRUE(deleted);
+}
+#endif
+
 }  // namespace internal
 }  // namespace arrow
diff --git a/cpp/src/arrow/util/io_util_test.manifest b/cpp/src/arrow/util/io_util_test.manifest
new file mode 100644
index 0000000..de5c0d8
--- /dev/null
+++ b/cpp/src/arrow/util/io_util_test.manifest
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+
+<!--
+  Enable long file paths on the target application
+  See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later
+  -->
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <assemblyIdentity type="win32" name="ArrowUtilityTest" version="1.1.1.1"/>
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
+      <ws2:longPathAware>true</ws2:longPathAware>
+    </windowsSettings>
+  </application>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+    <security>
+      <requestedPrivileges>
+        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+</assembly>
diff --git a/cpp/src/arrow/util/io_util_test.rc b/cpp/src/arrow/util/io_util_test.rc
new file mode 100644
index 0000000..c3236cb
--- /dev/null
+++ b/cpp/src/arrow/util/io_util_test.rc
@@ -0,0 +1,44 @@
+// 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.
+
+#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID  1
+#endif
+#ifndef RT_MANIFEST
+#define RT_MANIFEST  24
+#endif
+
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST
+BEGIN
+  "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>"
+  "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">"
+    "<assemblyIdentity type=""win32"" name=""ArrowUtilityTest"" version=""1.1.1.1""/>"
+    "<application xmlns=""urn:schemas-microsoft-com:asm.v3"">"
+      "<windowsSettings xmlns:ws2=""http://schemas.microsoft.com/SMI/2016/WindowsSettings"">"
+        "<ws2:longPathAware>true</ws2:longPathAware>"
+      "</windowsSettings>"
+    "</application>"
+    "<trustInfo xmlns=""urn:schemas-microsoft-com:asm.v3"">"
+      "<security>"
+        "<requestedPrivileges>"
+          "<requestedExecutionLevel level=""asInvoker"" uiAccess=""false""/>"
+        "</requestedPrivileges>"
+      "</security>"
+    "</trustInfo>"
+  "</assembly>"
+END
+


[arrow] 24/28: ARROW-8524: [CI] Free up space on github actions

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit efd64eaf1a9d1da1680a394343e3c5f2095df39a
Author: Krisztián Szűcs <sz...@gmail.com>
AuthorDate: Mon Apr 20 11:39:23 2020 +0200

    ARROW-8524: [CI] Free up space on github actions
    
    By default the root drive has ~8.3GB free space out of 84GB on the ubuntu-latest runner.
    Github actions ships a lot of [preinstalled software](https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md) which are essentially needless when we run docker based builds.
    
    I added a script to clean up just a couple of thing:
    - remove swap
    - clean apt cache
    - remove cached docker images
    - remove haskell
    
    This increases the available free space to [31GB](https://github.com/apache/arrow/pull/6988/checks?check_run_id=600949543#step:4:101).
    
    Closes #6988 from kszucs/actions-disk
    
    Authored-by: Krisztián Szűcs <sz...@gmail.com>
    Signed-off-by: Krisztián Szűcs <sz...@gmail.com>
---
 .github/workflows/archery.yml                   |  2 ++
 .github/workflows/comment_bot.yml               |  1 +
 .github/workflows/cpp.yml                       |  6 ++++
 .github/workflows/cpp_cron.yml                  | 15 ++++++++++
 .github/workflows/dev.yml                       |  6 ++++
 .github/workflows/go.yml                        |  3 ++
 .github/workflows/integration.yml               |  3 ++
 .github/workflows/java.yml                      | 10 +++++--
 .github/workflows/java_jni.yml                  |  3 ++
 .github/workflows/js.yml                        |  3 ++
 .github/workflows/python.yml                    | 12 ++++++++
 .github/workflows/python_cron.yml               | 12 ++++++++
 .github/workflows/r.yml                         |  6 ++++
 .github/workflows/ruby.yml                      |  3 ++
 .github/workflows/rust.yml                      |  3 ++
 ci/scripts/util_cleanup.sh                      | 37 +++++++++++++++++++++++++
 dev/tasks/docker-tests/github.linux.yml         |  3 ++
 dev/tasks/linux-packages/github.linux.arm64.yml |  4 +++
 dev/tasks/linux-packages/github.linux.yml       |  3 ++
 dev/tasks/r/github.linux.cran.yml               |  3 ++
 dev/tasks/verify-rc/github.nix.yml              |  3 ++
 21 files changed, 139 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/archery.yml b/.github/workflows/archery.yml
index 1943061..34997e3 100644
--- a/.github/workflows/archery.yml
+++ b/.github/workflows/archery.yml
@@ -43,6 +43,8 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        run: ci/scripts/util_cleanup.sh
       - name: Setup Python
         uses: actions/setup-python@v1
         with:
diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml
index 4eed869..ded6fa3 100644
--- a/.github/workflows/comment_bot.yml
+++ b/.github/workflows/comment_bot.yml
@@ -53,6 +53,7 @@ jobs:
           archery trigger-bot \
             --event-name ${{ github.event_name }} \
             --event-payload ${{ github.event_path }}
+
   autotune:
     name: "Fix all the things"
     if: startsWith(github.event.comment.body, 'autotune')
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index 6e8d825..287c0a5 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -50,6 +50,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures conda-cpp
@@ -89,6 +92,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures ubuntu-cpp-sanitizer
diff --git a/.github/workflows/cpp_cron.yml b/.github/workflows/cpp_cron.yml
index bcd0607..2a155a3 100644
--- a/.github/workflows/cpp_cron.yml
+++ b/.github/workflows/cpp_cron.yml
@@ -54,6 +54,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures debian-cpp
@@ -93,6 +96,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures fedora-cpp
@@ -132,6 +138,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures ubuntu-cpp
@@ -164,6 +173,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -205,6 +217,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Checkout OSS-Fuzz
         uses: actions/checkout@v1
         with:
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 89b2721..6eb92b8 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -40,6 +40,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: |
           docker-compose pull --ignore-pull-failures ubuntu-cpp
@@ -114,6 +117,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: |
           docker-compose pull --ignore-pull-failures ubuntu-cpp
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 23ac742..5accf9e 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -53,6 +53,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: docker-compose pull --ignore-pull-failures debian-go
       - name: Docker Build
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index bcbd217..b0d01d7 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -61,6 +61,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: |
           docker-compose pull --ignore-pull-failures conda-cpp
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 79e030f..6869283 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -55,9 +55,15 @@ jobs:
       MAVEN: ${{ matrix.maven }}
     steps:
       - name: Checkout Arrow
-        uses: actions/checkout@v1
+        uses: actions/checkout@v2
         with:
-          submodules: true
+          fetch-depth: 0
+      - name: Fetch Submodules and Tags
+        shell: bash
+        run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: docker-compose pull --ignore-pull-failures debian-java
       - name: Docker Build
diff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.yml
index c31670c..0e0cf1a 100644
--- a/.github/workflows/java_jni.yml
+++ b/.github/workflows/java_jni.yml
@@ -57,6 +57,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: |
           docker-compose pull --ignore-pull-failures debian-java
diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml
index ddebe5b..fdc852a 100644
--- a/.github/workflows/js.yml
+++ b/.github/workflows/js.yml
@@ -53,6 +53,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: docker-compose pull --ignore-pull-failures debian-js
       - name: Docker Build
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 3e12543..bf41cfb 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -51,6 +51,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -91,6 +94,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -133,6 +139,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -216,6 +225,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull centos-python-manylinux1
diff --git a/.github/workflows/python_cron.yml b/.github/workflows/python_cron.yml
index 41c9054..4f90493 100644
--- a/.github/workflows/python_cron.yml
+++ b/.github/workflows/python_cron.yml
@@ -52,6 +52,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -92,6 +95,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -132,6 +138,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -209,6 +218,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index a9f7293..1e40951 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -64,6 +64,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
@@ -112,6 +115,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: docker-compose pull --ignore-pull-failures r
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index ef0df90..c7ceccb 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -60,6 +60,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         shell: bash
         run: |
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 4341858..333f7f8 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -59,6 +59,9 @@ jobs:
       - name: Fetch Submodules and Tags
         shell: bash
         run: ci/scripts/util_checkout.sh
+      - name: Free Up Disk Space
+        shell: bash
+        run: ci/scripts/util_cleanup.sh
       - name: Docker Pull
         run: docker-compose pull --ignore-pull-failures debian-rust
       - name: Docker Build
diff --git a/ci/scripts/util_cleanup.sh b/ci/scripts/util_cleanup.sh
new file mode 100755
index 0000000..521b49e
--- /dev/null
+++ b/ci/scripts/util_cleanup.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+#
+# 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.
+
+# this script is github actions specific to free up disk space
+
+if [ $RUNNER_OS = "Linux" ]; then
+    # remove swap
+    sudo swapoff -a
+    sudo rm -f /swapfile
+
+    # clean apt cache
+    sudo apt clean
+
+    # remove haskell, consumes 8.6 GB
+    sudo rm -rf /opt/ghc
+
+    # remove cached docker images, around 13 GB
+    docker rmi $(docker image ls -aq)
+fi
+
+df -h
diff --git a/dev/tasks/docker-tests/github.linux.yml b/dev/tasks/docker-tests/github.linux.yml
index 06a90b8..e7496bb 100644
--- a/dev/tasks/docker-tests/github.linux.yml
+++ b/dev/tasks/docker-tests/github.linux.yml
@@ -36,6 +36,9 @@ jobs:
           git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
           git -C arrow checkout FETCH_HEAD
           git -C arrow submodule update --init --recursive
+      - name: Free Up Disk Space
+        shell: bash
+        run: arrow/ci/scripts/util_cleanup.sh
       - name: Run Docker Build
         shell: bash
         run: |
diff --git a/dev/tasks/linux-packages/github.linux.arm64.yml b/dev/tasks/linux-packages/github.linux.arm64.yml
index f2fc32d..d82e7fe 100644
--- a/dev/tasks/linux-packages/github.linux.arm64.yml
+++ b/dev/tasks/linux-packages/github.linux.arm64.yml
@@ -37,6 +37,10 @@ jobs:
           git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
           git -C arrow checkout FETCH_HEAD
           git -C arrow submodule update --init --recursive
+      - name: Free Up Disk Space
+        shell: bash
+        run: arrow/ci/scripts/util_cleanup.sh
+
       # We can remove this with binfmt-support 2.1.7 or later and
       # qemu-user-static 2.12 or later. It requires Debian buster or later,
       # or Ubuntu 18.10 or later.
diff --git a/dev/tasks/linux-packages/github.linux.yml b/dev/tasks/linux-packages/github.linux.yml
index a6b401f..f04a2ac 100644
--- a/dev/tasks/linux-packages/github.linux.yml
+++ b/dev/tasks/linux-packages/github.linux.yml
@@ -37,6 +37,9 @@ jobs:
           git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
           git -C arrow checkout FETCH_HEAD
           git -C arrow submodule update --init --recursive
+      - name: Free Up Disk Space
+        shell: bash
+        run: arrow/ci/scripts/util_cleanup.sh
       - name: Build
         run: |
           set -e
diff --git a/dev/tasks/r/github.linux.cran.yml b/dev/tasks/r/github.linux.cran.yml
index 0a5362b..8d0c126 100644
--- a/dev/tasks/r/github.linux.cran.yml
+++ b/dev/tasks/r/github.linux.cran.yml
@@ -50,6 +50,9 @@ jobs:
           git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
           git -C arrow checkout FETCH_HEAD
           git -C arrow submodule update --init --recursive
+      - name: Free Up Disk Space
+        shell: bash
+        run: arrow/ci/scripts/util_cleanup.sh
       - name: Fetch Submodules and Tags
         shell: bash
         run: cd arrow && ci/scripts/util_checkout.sh
diff --git a/dev/tasks/verify-rc/github.nix.yml b/dev/tasks/verify-rc/github.nix.yml
index 09455ee..dc0dc28 100644
--- a/dev/tasks/verify-rc/github.nix.yml
+++ b/dev/tasks/verify-rc/github.nix.yml
@@ -35,6 +35,9 @@ jobs:
           git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
           git -C arrow checkout FETCH_HEAD
           git -C arrow submodule update --init --recursive
+      - name: Free Up Disk Space
+        shell: bash
+        run: arrow/ci/scripts/util_cleanup.sh
       - name: Fetch Submodules and Tags
         shell: bash
         run: cd arrow && ci/scripts/util_checkout.sh


[arrow] 18/28: ARROW-8467: [C++] Fix TestArrayImport tests for big-endian platforms

Posted by ks...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1e6cb8b8d48acd4897375a750dc64943cb1a2b31
Author: Kazuaki Ishizaki <is...@jp.ibm.com>
AuthorDate: Sat Apr 18 15:06:08 2020 +0200

    ARROW-8467: [C++] Fix TestArrayImport tests for big-endian platforms
    
    This PR fixes two problems.
    
    1.  `DecodeMetadata()` always assume that a length of metadata is stored in a little-endian format. According to [this specification](https://github.com/apache/arrow/blob/master/docs/source/format/CDataInterface.rst#the-arrowschema-structure), the length is stored in a native endianness. This causes the following failure. This PR makes the interpretation of the length correct.
    
    ```
    12: [ RUN      ] TestSchemaImport.Struct
    12: /home/ishizaki/Arrow/arrow/cpp/build-support/run-test.sh: line 92: 19528 Segmentation fault      (core dumped) $TEST_EXECUTABLE "$@" 2>&1
    12:      19529 Done                    | $ROOT/build-support/asan_symbolize.py
    12:      19530 Done                    | ${CXXFILT:-c++filt}
    12:      19531 Done                    | $ROOT/build-support/stacktrace_addr2line.pl $TEST_EXECUTABLE
    12:      19532 Done                    | $pipe_cmd 2>&1
    12:      19533 Done                    | tee $LOGFILE
    ```
    
    1.  `primitive_buffers_...` used in `TestImportArray` implicitly assumes little-endian. The following is an example.
    
    ```
    static const uint8_t data_buffer1[] = {1, 2,  3,  4,  5,  6,  7,  8,
                                            9, 10, 11, 12, 13, 14, 15, 16};
    static const void* primitive_buffers_no_nulls1[2] = {nullptr, data_buffer1};
    ...
     TEST_F(TestArrayImport, PrimitiveWithOffset) {
       ...
       FillPrimitive(3, 0, 1, primitive_buffers_no_nulls1);
       CheckImport(ArrayFromJSON(uint16(), "[1027, 1541, 2055]"));
    ```
    
    The above code works since `03 04 05 06 07 08` is interpreted as `0x0403` (=1027), `0x0605` (=1541), and `0x0807` (=2055) on a little-endian platform. It is interpreted as `0x0304`, `0x0506`, and `0x0708` on a big-endian platform. This causes the following failure. The PR prepares `data_buffer` for each type on both endians.
    
    ```
    12: [ RUN      ] TestArrayImport.PrimitiveWithOffset
    12: /home/ishizaki/Arrow/arrow/cpp/src/arrow/testing/gtest_util.cc:77: Failure
    12: Failed
    12:
    12: @@ -0, +0 @@
    12: -1027
    12: -1541
    12: -2055
    12: +772
    12: +1286
    12: +1800
    12: Expected:
    12:   [
    12:     1027,
    12:     1541,
    12:     2055
    12:   ]
    12: Actual:
    12:   [
    12:     772,
    12:     1286,
    12:     1800
    12:   ]
    ```
    
    Closes #6958 from kiszk/SPARK-8484
    
    Authored-by: Kazuaki Ishizaki <is...@jp.ibm.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/c/bridge.cc      |   2 +-
 cpp/src/arrow/c/bridge_test.cc | 125 ++++++++++++++++++++++++-----------------
 2 files changed, 75 insertions(+), 52 deletions(-)

diff --git a/cpp/src/arrow/c/bridge.cc b/cpp/src/arrow/c/bridge.cc
index 9d973ef..224e9d1 100644
--- a/cpp/src/arrow/c/bridge.cc
+++ b/cpp/src/arrow/c/bridge.cc
@@ -714,7 +714,7 @@ Result<std::shared_ptr<KeyValueMetadata>> DecodeMetadata(const char* metadata) {
     int32_t v;
     memcpy(&v, metadata, 4);
     metadata += 4;
-    *out = BitUtil::FromLittleEndian(v);
+    *out = v;
     if (*out < 0) {
       return Status::Invalid("Invalid encoded metadata string");
     }
diff --git a/cpp/src/arrow/c/bridge_test.cc b/cpp/src/arrow/c/bridge_test.cc
index cf6732d..fe4a0d8 100644
--- a/cpp/src/arrow/c/bridge_test.cc
+++ b/cpp/src/arrow/c/bridge_test.cc
@@ -1498,14 +1498,37 @@ static const void* buffers_nulls_no_data1[1] = {bits_buffer1};
 static const uint8_t data_buffer1[] = {1, 2,  3,  4,  5,  6,  7,  8,
                                        9, 10, 11, 12, 13, 14, 15, 16};
 static const uint8_t data_buffer2[] = "abcdefghijklmnopqrstuvwxyz";
+#if ARROW_LITTLE_ENDIAN
 static const uint64_t data_buffer3[] = {123456789, 0, 987654321, 0};
+#else
+static const uint64_t data_buffer3[] = {0x15cd5b0700000000, 0, 0xb168de3a00000000, 0};
+#endif
 static const uint8_t data_buffer4[] = {1, 2, 0, 1, 3, 0};
 static const float data_buffer5[] = {0.0f, 1.5f, -2.0f, 3.0f, 4.0f, 5.0f};
 static const double data_buffer6[] = {0.0, 1.5, -2.0, 3.0, 4.0, 5.0};
 static const int32_t data_buffer7[] = {1234, 5678, 9012, 3456};
 static const int64_t data_buffer8[] = {123456789, 987654321, -123456789, -987654321};
-static const void* primitive_buffers_no_nulls1[2] = {nullptr, data_buffer1};
-static const void* primitive_buffers_nulls1[2] = {bits_buffer1, data_buffer1};
+#if ARROW_LITTLE_ENDIAN
+static const void* primitive_buffers_no_nulls1_8[2] = {nullptr, data_buffer1};
+static const void* primitive_buffers_no_nulls1_16[2] = {nullptr, data_buffer1};
+static const void* primitive_buffers_no_nulls1_32[2] = {nullptr, data_buffer1};
+static const void* primitive_buffers_no_nulls1_64[2] = {nullptr, data_buffer1};
+static const void* primitive_buffers_nulls1_8[2] = {bits_buffer1, data_buffer1};
+static const void* primitive_buffers_nulls1_16[2] = {bits_buffer1, data_buffer1};
+#else
+static const uint8_t data_buffer1_16[] = {2,  1,  4,  3,  6,  5,  8,  7,
+                                          10, 9, 12, 11, 14, 13, 16, 15};
+static const uint8_t data_buffer1_32[] = {4,  3,  2,  1,  8,  7,  6,  5,
+                                          12, 11, 10, 9, 16, 15, 14, 13};
+static const uint8_t data_buffer1_64[] = {8,  7,  6,  5,  4,  3,  2,  1,
+                                          16, 15, 14, 13, 12, 11, 10, 9};
+static const void* primitive_buffers_no_nulls1_8[2] = {nullptr, data_buffer1};
+static const void* primitive_buffers_no_nulls1_16[2] = {nullptr, data_buffer1_16};
+static const void* primitive_buffers_no_nulls1_32[2] = {nullptr, data_buffer1_32};
+static const void* primitive_buffers_no_nulls1_64[2] = {nullptr, data_buffer1_64};
+static const void* primitive_buffers_nulls1_8[2] = {bits_buffer1, data_buffer1};
+static const void* primitive_buffers_nulls1_16[2] = {bits_buffer1, data_buffer1_16};
+#endif
 static const void* primitive_buffers_no_nulls2[2] = {nullptr, data_buffer2};
 static const void* primitive_buffers_no_nulls3[2] = {nullptr, data_buffer3};
 static const void* primitive_buffers_no_nulls4[2] = {nullptr, data_buffer4};
@@ -1761,24 +1784,24 @@ class TestArrayImport : public ::testing::Test {
 };
 
 TEST_F(TestArrayImport, Primitive) {
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_8);
   CheckImport(ArrayFromJSON(int8(), "[1, 2, 3]"));
-  FillPrimitive(5, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(5, 0, 0, primitive_buffers_no_nulls1_8);
   CheckImport(ArrayFromJSON(uint8(), "[1, 2, 3, 4, 5]"));
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_16);
   CheckImport(ArrayFromJSON(int16(), "[513, 1027, 1541]"));
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_16);
   CheckImport(ArrayFromJSON(uint16(), "[513, 1027, 1541]"));
-  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1_32);
   CheckImport(ArrayFromJSON(int32(), "[67305985, 134678021]"));
-  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1_32);
   CheckImport(ArrayFromJSON(uint32(), "[67305985, 134678021]"));
-  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1_64);
   CheckImport(ArrayFromJSON(int64(), "[578437695752307201, 1157159078456920585]"));
-  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(2, 0, 0, primitive_buffers_no_nulls1_64);
   CheckImport(ArrayFromJSON(uint64(), "[578437695752307201, 1157159078456920585]"));
 
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_8);
   CheckImport(ArrayFromJSON(boolean(), "[true, false, false]"));
   FillPrimitive(6, 0, 0, primitive_buffers_no_nulls5);
   CheckImport(ArrayFromJSON(float32(), "[0.0, 1.5, -2.0, 3.0, 4.0, 5.0]"));
@@ -1786,17 +1809,17 @@ TEST_F(TestArrayImport, Primitive) {
   CheckImport(ArrayFromJSON(float64(), "[0.0, 1.5, -2.0, 3.0, 4.0, 5.0]"));
 
   // With nulls
-  FillPrimitive(9, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(9, -1, 0, primitive_buffers_nulls1_8);
   CheckImport(ArrayFromJSON(int8(), "[1, null, 3, 4, null, 6, 7, 8, 9]"));
-  FillPrimitive(9, 2, 0, primitive_buffers_nulls1);
+  FillPrimitive(9, 2, 0, primitive_buffers_nulls1_8);
   CheckImport(ArrayFromJSON(int8(), "[1, null, 3, 4, null, 6, 7, 8, 9]"));
-  FillPrimitive(3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(3, -1, 0, primitive_buffers_nulls1_16);
   CheckImport(ArrayFromJSON(int16(), "[513, null, 1541]"));
-  FillPrimitive(3, 1, 0, primitive_buffers_nulls1);
+  FillPrimitive(3, 1, 0, primitive_buffers_nulls1_16);
   CheckImport(ArrayFromJSON(int16(), "[513, null, 1541]"));
-  FillPrimitive(3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(3, -1, 0, primitive_buffers_nulls1_8);
   CheckImport(ArrayFromJSON(boolean(), "[true, null, false]"));
-  FillPrimitive(3, 1, 0, primitive_buffers_nulls1);
+  FillPrimitive(3, 1, 0, primitive_buffers_nulls1_8);
   CheckImport(ArrayFromJSON(boolean(), "[true, null, false]"));
 }
 
@@ -1868,12 +1891,12 @@ TEST_F(TestArrayImport, Null) {
 }
 
 TEST_F(TestArrayImport, PrimitiveWithOffset) {
-  FillPrimitive(3, 0, 2, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 2, primitive_buffers_no_nulls1_8);
   CheckImport(ArrayFromJSON(int8(), "[3, 4, 5]"));
-  FillPrimitive(3, 0, 1, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 1, primitive_buffers_no_nulls1_16);
   CheckImport(ArrayFromJSON(uint16(), "[1027, 1541, 2055]"));
 
-  FillPrimitive(4, 0, 7, primitive_buffers_no_nulls1);
+  FillPrimitive(4, 0, 7, primitive_buffers_no_nulls1_8);
   CheckImport(ArrayFromJSON(boolean(), "[false, false, true, false]"));
 }
 
@@ -1904,34 +1927,34 @@ TEST_F(TestArrayImport, String) {
 }
 
 TEST_F(TestArrayImport, List) {
-  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1_8);
   FillListLike(5, 0, 0, list_buffers_no_nulls1);
   CheckImport(ArrayFromJSON(list(int8()), "[[1, 2], [], [3, 4, 5], [6], [7, 8]]"));
-  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1_16);
   FillListLike(3, 1, 0, list_buffers_nulls1);
   CheckImport(ArrayFromJSON(list(int16()), "[[513, 1027], null, [1541, 2055, 2569]]"));
 
   // Large list
-  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1_16);
   FillListLike(3, 0, 0, large_list_buffers_no_nulls1);
   CheckImport(
       ArrayFromJSON(large_list(int16()), "[[513, 1027], [], [1541, 2055, 2569]]"));
 
   // Fixed-size list
-  FillPrimitive(AddChild(), 9, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 9, 0, 0, primitive_buffers_no_nulls1_8);
   FillFixedSizeListLike(3, 0, 0, buffers_no_nulls_no_data);
   CheckImport(
       ArrayFromJSON(fixed_size_list(int8(), 3), "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]"));
 }
 
 TEST_F(TestArrayImport, NestedList) {
-  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1_8);
   FillListLike(AddChild(), 5, 0, 0, list_buffers_no_nulls1);
   FillListLike(3, 0, 0, large_list_buffers_no_nulls1);
   CheckImport(ArrayFromJSON(large_list(list(int8())),
                             "[[[1, 2], []], [], [[3, 4, 5], [6], [7, 8]]]"));
 
-  FillPrimitive(AddChild(), 6, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 6, 0, 0, primitive_buffers_no_nulls1_8);
   FillFixedSizeListLike(AddChild(), 2, 0, 0, buffers_no_nulls_no_data);
   FillListLike(2, 0, 0, list_buffers_no_nulls1);
   CheckImport(
@@ -1940,31 +1963,31 @@ TEST_F(TestArrayImport, NestedList) {
 
 TEST_F(TestArrayImport, ListWithOffset) {
   // Offset in child
-  FillPrimitive(AddChild(), 8, 0, 1, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 8, 0, 1, primitive_buffers_no_nulls1_8);
   FillListLike(5, 0, 0, list_buffers_no_nulls1);
   CheckImport(ArrayFromJSON(list(int8()), "[[2, 3], [], [4, 5, 6], [7], [8, 9]]"));
 
-  FillPrimitive(AddChild(), 9, 0, 1, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 9, 0, 1, primitive_buffers_no_nulls1_8);
   FillFixedSizeListLike(3, 0, 0, buffers_no_nulls_no_data);
   CheckImport(
       ArrayFromJSON(fixed_size_list(int8(), 3), "[[2, 3, 4], [5, 6, 7], [8, 9, 10]]"));
 
   // Offset in parent
-  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 8, 0, 0, primitive_buffers_no_nulls1_8);
   FillListLike(4, 0, 1, list_buffers_no_nulls1);
   CheckImport(ArrayFromJSON(list(int8()), "[[], [3, 4, 5], [6], [7, 8]]"));
 
-  FillPrimitive(AddChild(), 9, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 9, 0, 0, primitive_buffers_no_nulls1_8);
   FillFixedSizeListLike(3, 0, 1, buffers_no_nulls_no_data);
   CheckImport(
       ArrayFromJSON(fixed_size_list(int8(), 3), "[[4, 5, 6], [7, 8, 9], [10, 11, 12]]"));
 
   // Both
-  FillPrimitive(AddChild(), 8, 0, 2, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 8, 0, 2, primitive_buffers_no_nulls1_8);
   FillListLike(4, 0, 1, list_buffers_no_nulls1);
   CheckImport(ArrayFromJSON(list(int8()), "[[], [5, 6, 7], [8], [9, 10]]"));
 
-  FillPrimitive(AddChild(), 9, 0, 2, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 9, 0, 2, primitive_buffers_no_nulls1_8);
   FillFixedSizeListLike(3, 0, 1, buffers_no_nulls_no_data);
   CheckImport(ArrayFromJSON(fixed_size_list(int8(), 3),
                             "[[6, 7, 8], [9, 10, 11], [12, 13, 14]]"));
@@ -1972,21 +1995,21 @@ TEST_F(TestArrayImport, ListWithOffset) {
 
 TEST_F(TestArrayImport, Struct) {
   FillStringLike(AddChild(), 3, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_16);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
   auto expected = ArrayFromJSON(struct_({field("strs", utf8()), field("ints", uint16())}),
                                 R"([["foo", 513], ["", null], ["bar", 1541]])");
   CheckImport(expected);
 
   FillStringLike(AddChild(), 3, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1_16);
   FillStructLike(3, -1, 0, 2, buffers_nulls_no_data1);
   expected = ArrayFromJSON(struct_({field("strs", utf8()), field("ints", uint16())}),
                            R"([["foo", 513], null, ["bar", 1541]])");
   CheckImport(expected);
 
   FillStringLike(AddChild(), 3, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1_16);
   FillStructLike(3, -1, 0, 2, buffers_nulls_no_data1);
   expected = ArrayFromJSON(
       struct_({field("strs", utf8(), /*nullable=*/false), field("ints", uint16())}),
@@ -1997,7 +2020,7 @@ TEST_F(TestArrayImport, Struct) {
 TEST_F(TestArrayImport, Union) {
   // Sparse
   FillStringLike(AddChild(), 4, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 4, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 4, -1, 0, primitive_buffers_nulls1_8);
   FillUnionLike(4, 0, 0, 2, sparse_union_buffers_no_nulls1);
   auto type =
       union_({field("strs", utf8()), field("ints", int8())}, {43, 42}, UnionMode::SPARSE);
@@ -2007,7 +2030,7 @@ TEST_F(TestArrayImport, Union) {
 
   // Dense
   FillStringLike(AddChild(), 2, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_8);
   FillUnionLike(5, 0, 0, 2, dense_union_buffers_no_nulls1);
   type =
       union_({field("strs", utf8()), field("ints", int8())}, {43, 42}, UnionMode::DENSE);
@@ -2019,7 +2042,7 @@ TEST_F(TestArrayImport, Union) {
 TEST_F(TestArrayImport, StructWithOffset) {
   // Child
   FillStringLike(AddChild(), 3, 0, 1, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, 0, 2, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 3, 0, 2, primitive_buffers_no_nulls1_8);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
   auto expected = ArrayFromJSON(struct_({field("strs", utf8()), field("ints", int8())}),
                                 R"([["", 3], ["bar", 4], ["quux", 5]])");
@@ -2027,7 +2050,7 @@ TEST_F(TestArrayImport, StructWithOffset) {
 
   // Parent and child
   FillStringLike(AddChild(), 4, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 4, 0, 2, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 4, 0, 2, primitive_buffers_no_nulls1_8);
   FillStructLike(3, 0, 1, 2, buffers_no_nulls_no_data);
   expected = ArrayFromJSON(struct_({field("strs", utf8()), field("ints", int8())}),
                            R"([["", 4], ["bar", 5], ["quux", 6]])");
@@ -2036,7 +2059,7 @@ TEST_F(TestArrayImport, StructWithOffset) {
 
 TEST_F(TestArrayImport, Map) {
   FillStringLike(AddChild(), 5, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 5, 0, 0, primitive_buffers_no_nulls1_8);
   FillStructLike(AddChild(), 5, 0, 0, 2, buffers_no_nulls_no_data);
   FillListLike(3, 1, 0, list_buffers_nulls1);
   auto expected = ArrayFromJSON(
@@ -2069,7 +2092,7 @@ TEST_F(TestArrayImport, Dictionary) {
 }
 
 TEST_F(TestArrayImport, NestedDictionary) {
-  FillPrimitive(AddChild(), 6, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 6, 0, 0, primitive_buffers_no_nulls1_8);
   FillListLike(AddChild(), 4, 0, 0, list_buffers_no_nulls1);
   FillPrimitive(6, 0, 0, primitive_buffers_no_nulls4);
   FillDictionary();
@@ -2123,19 +2146,19 @@ TEST_F(TestArrayImport, DictionaryWithOffset) {
 
 TEST_F(TestArrayImport, PrimitiveError) {
   // Bad number of buffers
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_8);
   c_struct_.n_buffers = 1;
   CheckImportError(int8());
 
   // Zero null bitmap but non-zero null_count
-  FillPrimitive(3, 1, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 1, 0, primitive_buffers_no_nulls1_8);
   CheckImportError(int8());
 }
 
 TEST_F(TestArrayImport, StructError) {
   // Bad number of children
   FillStringLike(AddChild(), 3, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_8);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
   CheckImportError(struct_({field("strs", utf8())}));
 }
@@ -2176,7 +2199,7 @@ TEST_F(TestArrayImport, ImportRecordBatch) {
   auto expected_ints = ArrayFromJSON(uint16(), "[513, null, 1541]");
 
   FillStringLike(AddChild(), 3, 0, 1, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_16);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
 
   auto expected = RecordBatch::Make(schema, 3, {expected_strs, expected_ints});
@@ -2186,14 +2209,14 @@ TEST_F(TestArrayImport, ImportRecordBatch) {
 TEST_F(TestArrayImport, ImportRecordBatchError) {
   // Struct with non-zero parent offset
   FillStringLike(AddChild(), 4, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 4, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 4, 0, 0, primitive_buffers_no_nulls1_16);
   FillStructLike(3, 0, 1, 2, buffers_no_nulls_no_data);
   auto schema = ::arrow::schema({field("strs", utf8()), field("ints", uint16())});
   CheckImportError(schema);
 
   // Struct with nulls in parent
   FillStringLike(AddChild(), 3, 0, 0, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(AddChild(), 3, 0, 0, primitive_buffers_no_nulls1_8);
   FillStructLike(3, 1, 0, 2, buffers_nulls_no_data1);
   CheckImportError(schema);
 }
@@ -2204,7 +2227,7 @@ TEST_F(TestArrayImport, ImportArrayAndType) {
   schema_builder.FillPrimitive("c");
   SchemaReleaseCallback schema_cb(&schema_builder.c_struct_);
 
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_8);
   ArrayReleaseCallback array_cb(&c_struct_);
 
   ASSERT_OK_AND_ASSIGN(auto array, ImportArray(&c_struct_, &schema_builder.c_struct_));
@@ -2222,7 +2245,7 @@ TEST_F(TestArrayImport, ImportArrayAndTypeError) {
   schema_builder.FillPrimitive("cc");
   SchemaReleaseCallback schema_cb(&schema_builder.c_struct_);
 
-  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1);
+  FillPrimitive(3, 0, 0, primitive_buffers_no_nulls1_8);
   ArrayReleaseCallback array_cb(&c_struct_);
 
   ASSERT_RAISES(Invalid, ImportArray(&c_struct_, &schema_builder.c_struct_));
@@ -2243,7 +2266,7 @@ TEST_F(TestArrayImport, ImportRecordBatchAndSchema) {
   SchemaReleaseCallback schema_cb(&schema_builder.c_struct_);
 
   FillStringLike(AddChild(), 3, 0, 1, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_16);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
   ArrayReleaseCallback array_cb(&c_struct_);
 
@@ -2265,7 +2288,7 @@ TEST_F(TestArrayImport, ImportRecordBatchAndSchemaError) {
   SchemaReleaseCallback schema_cb(&schema_builder.c_struct_);
 
   FillStringLike(AddChild(), 3, 0, 1, string_buffers_no_nulls1);
-  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1);
+  FillPrimitive(AddChild(), 3, -1, 0, primitive_buffers_nulls1_8);
   FillStructLike(3, 0, 0, 2, buffers_no_nulls_no_data);
   ArrayReleaseCallback array_cb(&c_struct_);