Skip to content

Commit f6ac593

Browse files
authored
Merge branch 'apache:master' into flight-jdbc-driver
2 parents 4311bfa + aa2e8da commit f6ac593

File tree

290 files changed

+21141
-2699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+21141
-2699
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
!ci/**
2929
!c_glib/Gemfile
3030
!dev/archery/setup.py
31+
!dev/release/setup-*.sh
3132
!docs/requirements*.txt
3233
!python/requirements*.txt
3334
!python/manylinux1/**

.env

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ GO=1.16
6161
HDFS=3.2.1
6262
JDK=8
6363
KARTOTHEK=latest
64-
LLVM=12
64+
# LLVM 12 and GCC 11 reports -Wmismatched-new-delete.
65+
LLVM=13
6566
MAVEN=3.5.4
6667
NODE=16
6768
NUMPY=latest

.github/workflows/cpp.yml

+9
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
ARROW_DATASET: ON
127127
ARROW_FLIGHT: ON
128128
ARROW_GANDIVA: ON
129+
ARROW_GCS: ON
129130
ARROW_HDFS: ON
130131
ARROW_HOME: /usr/local
131132
ARROW_JEMALLOC: ON
@@ -141,6 +142,8 @@ jobs:
141142
ARROW_WITH_SNAPPY: ON
142143
ARROW_WITH_ZLIB: ON
143144
ARROW_WITH_ZSTD: ON
145+
# System Abseil installed by Homebrew uses C++ 17
146+
CMAKE_CXX_STANDARD: 17
144147
steps:
145148
- name: Checkout Arrow
146149
uses: actions/checkout@v2
@@ -153,6 +156,9 @@ jobs:
153156
rm -f /usr/local/bin/2to3
154157
brew update --preinstall
155158
brew bundle --file=cpp/Brewfile
159+
- name: Install Google Cloud Storage Testbench
160+
shell: bash
161+
run: ci/scripts/install_gcs_testbench.sh default
156162
- name: Setup ccache
157163
run: |
158164
ci/scripts/ccache_setup.sh
@@ -268,6 +274,9 @@ jobs:
268274
ARROW_DATASET: ON
269275
ARROW_FLIGHT: ON
270276
ARROW_GANDIVA: ON
277+
# google-could-cpp uses _dupenv_s() but it can't be used with msvcrt.
278+
# We need to use ucrt to use _dupenv_s().
279+
# ARROW_GCS: ON
271280
ARROW_HDFS: OFF
272281
ARROW_HOME: /mingw${{ matrix.mingw-n-bits }}
273282
ARROW_JEMALLOC: OFF

.github/workflows/go.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
fetch-depth: 0
153153
submodules: recursive
154154
- name: Install staticcheck
155-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
155+
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
156156
- name: Build
157157
shell: bash
158158
run: ci/scripts/go_build.sh $(pwd)
@@ -180,7 +180,7 @@ jobs:
180180
fetch-depth: 0
181181
submodules: recursive
182182
- name: Install staticcheck
183-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
183+
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
184184
- name: Build
185185
shell: bash
186186
run: ci/scripts/go_build.sh $(pwd)
@@ -213,7 +213,7 @@ jobs:
213213
shell: bash
214214
run: brew install apache-arrow
215215
- name: Install staticcheck
216-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
216+
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
217217
- name: Build
218218
shell: bash
219219
run: ci/scripts/go_build.sh $(pwd)
@@ -268,7 +268,7 @@ jobs:
268268
with:
269269
go-version: '1.17'
270270
- name: Install staticcheck
271-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
271+
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
272272
- name: Build
273273
shell: bash
274274
run: ci/scripts/go_build.sh $(pwd)

.github/workflows/r.yml

+35-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
name: AMD64 Windows R ${{ matrix.config.rversion }} RTools ${{ matrix.config.rtools }}
237237
runs-on: windows-2019
238238
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
239-
timeout-minutes: 60
239+
timeout-minutes: 75
240240
strategy:
241241
fail-fast: false
242242
matrix:
@@ -329,12 +329,37 @@ jobs:
329329
if: ${{ matrix.config.rtools == 35 }}
330330
shell: Rscript {0}
331331
run: install.packages("cpp11", type = "source")
332+
- name: Prune dependencies (on R 3.6)
333+
if: ${{ matrix.config.rtools == 35 }}
334+
shell: Rscript {0}
335+
run: |
336+
# To prevent the build from timing out, let's prune some optional deps (and their possible version requirements)
337+
setwd("r")
338+
# create a backup to use later
339+
file.copy("DESCRIPTION", "DESCRIPTION.bak")
340+
d <- read.dcf("DESCRIPTION")
341+
to_prune <- c("duckdb", "DBI", "dbplyr", "decor", "knitr", "rmarkdown", "pkgload", "reticulate")
342+
pattern <- paste0("\\n?", to_prune, "( \\([^,]*\\))?,?", collapse = "|")
343+
d[,"Suggests"] <- gsub(pattern, "", d[,"Suggests"])
344+
write.dcf(d, "DESCRIPTION")
345+
- name: R package cache
346+
uses: actions/cache@v2
347+
with:
348+
path: |
349+
${{ env.R_LIBS_USER }}/*
350+
key: r-${{ matrix.config.rtools }}-R-LIBS-${{ hashFiles('r/DESCRIPTION') }}
351+
restore-keys: r-${{ matrix.config.rtools }}-R-LIBS-
332352
- name: Install R package dependencies
333353
shell: Rscript {0}
334354
run: |
335355
# options(pkgType="win.binary") # processx doesn't have a binary for UCRT yet
336356
install.packages(c("remotes", "rcmdcheck"))
337357
remotes::install_deps("r", dependencies = TRUE)
358+
- name: Restore DESCRIPTION for 3.6
359+
if: ${{ matrix.config.rtools == 35 }}
360+
run: |
361+
rm r/DESCRIPTION
362+
mv r/DESCRIPTION.bak r/DESCRIPTION
338363
- name: Check
339364
shell: Rscript {0}
340365
run: |
@@ -357,6 +382,15 @@ jobs:
357382
check_dir = 'check',
358383
timeout = 3600
359384
)
385+
- name: Run lintr
386+
env:
387+
NOT_CRAN: "true"
388+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
389+
shell: Rscript {0}
390+
working-directory: r
391+
run: |
392+
remotes::install_github("jonkeane/lintr@arrow-branch")
393+
lintr::expect_lint_free()
360394
- name: Dump install logs
361395
shell: cmd
362396
run: cat r/check/arrow.Rcheck/00install.out

.github/workflows/ruby.yml

+3
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
ulimit -c unlimited
9191
archery docker run \
9292
-e ARROW_FLIGHT=ON \
93+
-e ARROW_GCS=ON \
9394
-e Protobuf_SOURCE=BUNDLED \
9495
-e gRPC_SOURCE=BUNDLED \
9596
ubuntu-ruby
@@ -110,6 +111,7 @@ jobs:
110111
ARROW_BUILD_TESTS: OFF
111112
ARROW_FLIGHT: ON
112113
ARROW_GANDIVA: ON
114+
ARROW_GCS: ON
113115
ARROW_GLIB_GTK_DOC: true
114116
ARROW_GLIB_WERROR: true
115117
ARROW_HOME: /usr/local
@@ -188,6 +190,7 @@ jobs:
188190
ARROW_BUILD_TYPE: release
189191
ARROW_FLIGHT: ON
190192
ARROW_GANDIVA: ON
193+
ARROW_GCS: ON
191194
ARROW_HDFS: OFF
192195
ARROW_HOME: /ucrt${{ matrix.mingw-n-bits }}
193196
ARROW_JEMALLOC: OFF

c_glib/arrow-flight-glib/client.cpp

+9-12
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,11 @@ gaflight_client_new(GAFlightLocation *location,
251251
arrow::Status status;
252252
if (options) {
253253
const auto flight_options = gaflight_client_options_get_raw(options);
254-
status = arrow::flight::FlightClient::Connect(*flight_location,
255-
*flight_options,
256-
&flight_client);
254+
auto result = arrow::flight::FlightClient::Connect(*flight_location, *flight_options);
255+
status = std::move(result).Value(&flight_client);
257256
} else {
258-
status = arrow::flight::FlightClient::Connect(*flight_location,
259-
&flight_client);
257+
auto result = arrow::flight::FlightClient::Connect(*flight_location);
258+
status = std::move(result).Value(&flight_client);
260259
}
261260
if (garrow::check(error, status, "[flight-client][new]")) {
262261
return gaflight_client_new_raw(flight_client.release());
@@ -315,9 +314,8 @@ gaflight_client_list_flights(GAFlightClient *client,
315314
flight_options = gaflight_call_options_get_raw(options);
316315
}
317316
std::unique_ptr<arrow::flight::FlightListing> flight_listing;
318-
auto status = flight_client->ListFlights(*flight_options,
319-
*flight_criteria,
320-
&flight_listing);
317+
auto result = flight_client->ListFlights(*flight_options, *flight_criteria);
318+
auto status = std::move(result).Value(&flight_listing);
321319
if (!garrow::check(error,
322320
status,
323321
"[flight-client][list-flights]")) {
@@ -326,7 +324,7 @@ gaflight_client_list_flights(GAFlightClient *client,
326324
GList *listing = NULL;
327325
std::unique_ptr<arrow::flight::FlightInfo> flight_info;
328326
while (true) {
329-
status = flight_listing->Next(&flight_info);
327+
status = flight_listing->Next().Value(&flight_info);
330328
if (!garrow::check(error,
331329
status,
332330
"[flight-client][list-flights]")) {
@@ -369,9 +367,8 @@ gaflight_client_do_get(GAFlightClient *client,
369367
flight_options = gaflight_call_options_get_raw(options);
370368
}
371369
std::unique_ptr<arrow::flight::FlightStreamReader> flight_reader;
372-
auto status = flight_client->DoGet(*flight_options,
373-
*flight_ticket,
374-
&flight_reader);
370+
auto result = flight_client->DoGet(*flight_options, *flight_ticket);
371+
auto status = std::move(result).Value(&flight_reader);
375372
if (garrow::check(error,
376373
status,
377374
"[flight-client][do-get]")) {

c_glib/arrow-flight-glib/common.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ gaflight_location_new(const gchar *uri,
245245
auto location = GAFLIGHT_LOCATION(g_object_new(GAFLIGHT_TYPE_LOCATION, NULL));
246246
auto flight_location = gaflight_location_get_raw(location);
247247
if (garrow::check(error,
248-
arrow::flight::Location::Parse(uri, flight_location),
248+
arrow::flight::Location::Parse(uri).Value(flight_location),
249249
"[flight-location][new]")) {
250250
return location;
251251
} else {
@@ -1018,10 +1018,10 @@ gaflight_info_get_schema(GAFlightInfo *info,
10181018
std::shared_ptr<arrow::Schema> arrow_schema;
10191019
if (options) {
10201020
auto arrow_memo = garrow_read_options_get_dictionary_memo_raw(options);
1021-
status = flight_info->GetSchema(arrow_memo, &arrow_schema);
1021+
status = flight_info->GetSchema(arrow_memo).Value(&arrow_schema);
10221022
} else {
10231023
arrow::ipc::DictionaryMemo arrow_memo;
1024-
status = flight_info->GetSchema(&arrow_memo, &arrow_schema);
1024+
status = flight_info->GetSchema(&arrow_memo).Value(&arrow_schema);
10251025
}
10261026
if (garrow::check(error, status, "[flight-info][get-schema]")) {
10271027
return garrow_schema_new_raw(&arrow_schema);
@@ -1287,7 +1287,7 @@ gaflight_record_batch_reader_read_next(GAFlightRecordBatchReader *reader,
12871287
{
12881288
auto flight_reader = gaflight_record_batch_reader_get_raw(reader);
12891289
arrow::flight::FlightStreamChunk flight_chunk;
1290-
auto status = flight_reader->Next(&flight_chunk);
1290+
auto status = flight_reader->Next().Value(&flight_chunk);
12911291
if (garrow::check(error, status, "[flight-record-batch-reader][read-next]")) {
12921292
if (flight_chunk.data) {
12931293
return gaflight_stream_chunk_new_raw(&flight_chunk);
@@ -1314,7 +1314,7 @@ gaflight_record_batch_reader_read_all(GAFlightRecordBatchReader *reader,
13141314
{
13151315
auto flight_reader = gaflight_record_batch_reader_get_raw(reader);
13161316
std::shared_ptr<arrow::Table> arrow_table;
1317-
auto status = flight_reader->ReadAll(&arrow_table);
1317+
auto status = flight_reader->ToTable().Value(&arrow_table);
13181318
if (garrow::check(error, status, "[flight-record-batch-reader][read-all]")) {
13191319
return garrow_table_new_raw(&arrow_table);
13201320
} else {

c_glib/arrow-flight-glib/server.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -450,15 +450,14 @@ namespace gaflight {
450450
return stream->schema();
451451
}
452452

453-
arrow::Status GetSchemaPayload(
454-
arrow::flight::FlightPayload *payload) override {
453+
arrow::Result<arrow::flight::FlightPayload> GetSchemaPayload() override {
455454
auto stream = gaflight_data_stream_get_raw(gastream_);
456-
return stream->GetSchemaPayload(payload);
455+
return stream->GetSchemaPayload();
457456
}
458457

459-
arrow::Status Next(arrow::flight::FlightPayload *payload) override {
458+
arrow::Result<arrow::flight::FlightPayload> Next() override {
460459
auto stream = gaflight_data_stream_get_raw(gastream_);
461-
return stream->Next(payload);
460+
return stream->Next();
462461
}
463462

464463
private:

ci/conda_env_python.txt

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ numpy>=1.16.6
2626
pytest
2727
pytest-faulthandler
2828
pytest-lazy-fixture
29-
pytz
3029
s3fs>=2021.8.0
3130
setuptools
3231
setuptools_scm

ci/docker/debian-10-go.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARG arch=amd64
1919
ARG go=1.15
2020
FROM ${arch}/golang:${go}-buster
2121

22-
RUN GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@latest
22+
RUN GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
2323

2424
# TODO(kszucs):
2525
# 1. add the files required to install the dependencies to .dockerignore

ci/docker/debian-11-go.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARG arch=amd64
1919
ARG go=1.16
2020
FROM ${arch}/golang:${go}-bullseye
2121

22-
RUN GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@latest
22+
RUN GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
2323

2424
# TODO(kszucs):
2525
# 1. add the files required to install the dependencies to .dockerignore

ci/docker/ubuntu-18.04-verify-rc.dockerfile

+3-37
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,8 @@ ARG arch=amd64
1919
FROM ${arch}/ubuntu:18.04
2020

2121
ENV DEBIAN_FRONTEND=noninteractive
22-
23-
ARG llvm=12
24-
RUN apt-get update -y -q && \
25-
apt-get install -y -q --no-install-recommends \
26-
apt-transport-https \
27-
ca-certificates \
28-
gnupg \
29-
wget && \
30-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
31-
echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-${llvm} main" > \
32-
/etc/apt/sources.list.d/llvm.list && \
33-
apt-get update -y -q && \
34-
apt-get install -y -q --no-install-recommends \
35-
build-essential \
36-
clang \
37-
cmake \
38-
curl \
39-
git \
40-
libcurl4-openssl-dev \
41-
libgirepository1.0-dev \
42-
libglib2.0-dev \
43-
libsqlite3-dev \
44-
libssl-dev \
45-
llvm-${llvm}-dev \
46-
maven \
47-
ninja-build \
48-
openjdk-11-jdk \
49-
pkg-config \
50-
python3-pip \
51-
python3.8-dev \
52-
python3.8-venv \
53-
ruby-dev \
54-
wget \
55-
tzdata && \
22+
COPY dev/release/setup-ubuntu.sh /
23+
RUN /setup-ubuntu.sh && \
24+
rm /setup-ubuntu.sh && \
5625
apt-get clean && \
5726
rm -rf /var/lib/apt/lists*
58-
59-
RUN python3.8 -m pip install -U pip && \
60-
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1

ci/docker/ubuntu-20.04-verify-rc.dockerfile

+3-23
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,8 @@ ARG arch=amd64
1919
FROM ${arch}/ubuntu:20.04
2020

2121
ENV DEBIAN_FRONTEND=noninteractive
22-
RUN apt-get update -y -q && \
23-
apt-get install -y -q --no-install-recommends \
24-
build-essential \
25-
clang \
26-
cmake \
27-
curl \
28-
git \
29-
libcurl4-openssl-dev \
30-
libgirepository1.0-dev \
31-
libglib2.0-dev \
32-
libsqlite3-dev \
33-
libssl-dev \
34-
llvm-dev \
35-
maven \
36-
ninja-build \
37-
nlohmann-json3-dev \
38-
openjdk-11-jdk \
39-
pkg-config \
40-
python3-dev \
41-
python3-pip \
42-
python3-venv \
43-
ruby-dev \
44-
wget && \
22+
COPY dev/release/setup-ubuntu.sh /
23+
RUN /setup-ubuntu.sh && \
24+
rm /setup-ubuntu.sh && \
4525
apt-get clean && \
4626
rm -rf /var/lib/apt/lists*

0 commit comments

Comments
 (0)