Skip to content

Commit 7548e96

Browse files
Update to Arrow 12.0.0, update tonic and prost (apache#2253)
* Update to arrow-rs 12 * Update for change in arrow interface * Update prost/tonic * add ticket reference * Setup building with standardized action, install protoc * Update etcd-client requirement from 0.8 to 0.9 Updates the requirements on [etcd-client](https://github.com/etcdv3/etcd-client) to permit the latest version. - [Release notes](https://github.com/etcdv3/etcd-client/releases) - [Commits](etcdv3/etcd-client@0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: etcd-client dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 7334481 commit 7548e96

File tree

16 files changed

+101
-56
lines changed

16 files changed

+101
-56
lines changed
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Prepare Rust Builder
19+
description: 'Prepare Rust Build Environment'
20+
inputs:
21+
rust-version:
22+
description: 'version of rust to install (e.g. stable)'
23+
required: true
24+
default: 'stable'
25+
runs:
26+
using: "composite"
27+
steps:
28+
- name: Install Build Dependencies
29+
shell: bash
30+
run: |
31+
apt-get update
32+
apt-get install -y protobuf-compiler
33+
- name: Setup Rust toolchain
34+
shell: bash
35+
run: |
36+
echo "Installing ${{ inputs.rust-version }}"
37+
rustup toolchain install ${{ inputs.rust-version }}
38+
rustup default ${{ inputs.rust-version }}
39+
rustup component add rustfmt

.github/workflows/rust.yml

+20-22
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ jobs:
5454
path: /github/home/target
5555
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}-
5656
- name: Setup Rust toolchain
57-
run: |
58-
rustup toolchain install ${{ matrix.rust }}
59-
rustup default ${{ matrix.rust }}
60-
rustup component add rustfmt
57+
uses: ./.github/actions/setup-builder
58+
with:
59+
rust-version: ${{ matrix.rust }}
6160
- name: Build workspace in debug mode
6261
run: |
6362
cargo build
@@ -117,10 +116,9 @@ jobs:
117116
# this key equals the ones on `linux-build-lib` for re-use
118117
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
119118
- name: Setup Rust toolchain
120-
run: |
121-
rustup toolchain install ${{ matrix.rust }}
122-
rustup default ${{ matrix.rust }}
123-
rustup component add rustfmt
119+
uses: ./.github/actions/setup-builder
120+
with:
121+
rust-version: ${{ matrix.rust }}
124122
- name: Run tests
125123
run: |
126124
export ARROW_TEST_DATA=$(pwd)/testing/data
@@ -285,10 +283,9 @@ jobs:
285283
echo "LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
286284
python -m pip install pyarrow
287285
- name: Setup Rust toolchain
288-
run: |
289-
rustup toolchain install ${{ matrix.rust }}
290-
rustup default ${{ matrix.rust }}
291-
rustup component add rustfmt
286+
uses: ./.github/actions/setup-builder
287+
with:
288+
rust-version: ${{ matrix.rust }}
292289
- name: Run tests
293290
run: |
294291
cd datafusion
@@ -343,10 +340,12 @@ jobs:
343340
# this key equals the ones on `linux-build-lib` for re-use
344341
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
345342
- name: Setup Rust toolchain
343+
uses: ./.github/actions/setup-builder
344+
with:
345+
rust-version: ${{ matrix.rust }}
346+
- name: Install Clippy
346347
run: |
347-
rustup toolchain install ${{ matrix.rust }}
348-
rustup default ${{ matrix.rust }}
349-
rustup component add rustfmt clippy
348+
rustup component add clippy
350349
- name: Run clippy
351350
run: |
352351
cargo clippy --all-targets --workspace -- -D warnings
@@ -420,10 +419,9 @@ jobs:
420419
# this key equals the ones on `linux-build-lib` for re-use
421420
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
422421
- name: Setup Rust toolchain
423-
run: |
424-
rustup toolchain install ${{ matrix.rust }}
425-
rustup default ${{ matrix.rust }}
426-
rustup component add rustfmt
422+
uses: ./.github/actions/setup-builder
423+
with:
424+
rust-version: ${{ matrix.rust }}
427425
- name: Run tests
428426
run: |
429427
export ARROW_TEST_DATA=$(pwd)/testing/data
@@ -466,9 +464,9 @@ jobs:
466464
# this key equals the ones on `linux-build-lib` for re-use
467465
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
468466
- name: Setup Rust toolchain
469-
run: |
470-
rustup toolchain install ${{ matrix.rust }}
471-
rustup default ${{ matrix.rust }}
467+
uses: ./.github/actions/setup-builder
468+
with:
469+
rust-version: ${{ matrix.rust }}
472470
- name: Install cargo-tomlfmt
473471
run: |
474472
which cargo-tomlfmt || cargo install cargo-tomlfmt

ballista-examples/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ ballista = { path = "../ballista/rust/client", version = "0.6.0" }
3939
datafusion = { path = "../datafusion/core" }
4040
futures = "0.3"
4141
num_cpus = "1.13.0"
42-
prost = "0.9"
42+
prost = "0.10"
4343
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
44-
tonic = "0.6"
44+
tonic = "0.7"

ballista/rust/core/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ simd = ["datafusion/simd"]
3434
[dependencies]
3535
ahash = { version = "0.7", default-features = false }
3636

37-
arrow-flight = { version = "11.1" }
37+
arrow-flight = { version = "12" }
3838
async-trait = "0.1.41"
3939
chrono = { version = "0.4", default-features = false }
4040
clap = { version = "3", features = ["derive", "cargo"] }
@@ -49,12 +49,12 @@ once_cell = "1.9.0"
4949

5050
parking_lot = "0.12"
5151
parse_arg = "0.1.3"
52-
prost = "0.9"
53-
prost-types = "0.9"
52+
prost = "0.10"
53+
prost-types = "0.10"
5454
serde = { version = "1", features = ["derive"] }
5555
sqlparser = "0.16"
5656
tokio = "1.0"
57-
tonic = "0.6"
57+
tonic = "0.7"
5858
uuid = { version = "0.8", features = ["v4"] }
5959
walkdir = "2.3.2"
6060

@@ -63,4 +63,4 @@ tempfile = "3"
6363

6464
[build-dependencies]
6565
rustc_version = "0.4.0"
66-
tonic-build = { version = "0.6" }
66+
tonic-build = { version = "0.7" }

ballista/rust/executor/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ snmalloc = ["snmalloc-rs"]
3333

3434
[dependencies]
3535
anyhow = "1"
36-
arrow = { version = "11.1" }
37-
arrow-flight = { version = "11.1" }
36+
arrow = { version = "12" }
37+
arrow-flight = { version = "12" }
3838
async-trait = "0.1.41"
3939
ballista-core = { path = "../core", version = "0.6.0" }
4040
chrono = { version = "0.4", default-features = false }
@@ -49,7 +49,7 @@ snmalloc-rs = { version = "0.2", optional = true }
4949
tempfile = "3"
5050
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "parking_lot"] }
5151
tokio-stream = { version = "0.1", features = ["net"] }
52-
tonic = "0.6"
52+
tonic = "0.7"
5353
uuid = { version = "0.8", features = ["v4"] }
5454

5555
[dev-dependencies]

ballista/rust/scheduler/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ clap = { version = "3", features = ["derive", "cargo"] }
4242
configure_me = "0.4.0"
4343
datafusion = { path = "../../../datafusion/core", version = "7.0.0" }
4444
env_logger = "0.9"
45-
etcd-client = { version = "0.8", optional = true }
45+
etcd-client = { version = "0.9", optional = true }
4646
futures = "0.3"
4747
http = "0.2"
4848
http-body = "0.4"
4949
hyper = "0.14.4"
5050
log = "0.4"
5151
parking_lot = "0.12"
5252
parse_arg = "0.1.3"
53-
prost = "0.9"
53+
prost = "0.10"
5454
rand = "0.8"
5555
serde = { version = "1", features = ["derive"] }
5656
sled_package = { package = "sled", version = "0.34", optional = true }
5757
tokio = { version = "1.0", features = ["full"] }
5858
tokio-stream = { version = "0.1", features = ["net"], optional = true }
59-
tonic = "0.6"
59+
tonic = "0.7"
6060
tower = { version = "0.4" }
6161
warp = "0.3"
6262

@@ -66,4 +66,4 @@ uuid = { version = "0.8", features = ["v4"] }
6666

6767
[build-dependencies]
6868
configure_me_codegen = "0.4.1"
69-
tonic-build = { version = "0.6" }
69+
tonic-build = { version = "0.7" }

datafusion-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repository = "https://github.com/apache/arrow-datafusion"
2828
rust-version = "1.59"
2929

3030
[dependencies]
31-
arrow = { version = "11.1" }
31+
arrow = { version = "12" }
3232
ballista = { path = "../ballista/rust/client", version = "0.6.0", optional = true }
3333
clap = { version = "3", features = ["derive", "cargo"] }
3434
datafusion = { path = "../datafusion/core", version = "7.0.0" }

datafusion-examples/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ path = "examples/avro_sql.rs"
3434
required-features = ["datafusion/avro"]
3535

3636
[dev-dependencies]
37-
arrow-flight = { version = "11.1" }
37+
arrow-flight = { version = "12" }
3838
async-trait = "0.1.41"
3939
datafusion = { path = "../datafusion/core" }
4040
futures = "0.3"
4141
num_cpus = "1.13.0"
42-
prost = "0.9"
42+
prost = "0.10"
4343
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
44-
tonic = "0.6"
44+
tonic = "0.7"

datafusion/common/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jit = ["cranelift-module"]
3838
pyarrow = ["pyo3"]
3939

4040
[dependencies]
41-
arrow = { version = "11.1", features = ["prettyprint"] }
41+
arrow = { version = "12", features = ["prettyprint"] }
4242
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
4343
cranelift-module = { version = "0.82.0", optional = true }
4444
ordered-float = "2.10"
45-
parquet = { version = "11.1", features = ["arrow"], optional = true }
45+
parquet = { version = "12", features = ["arrow"], optional = true }
4646
pyo3 = { version = "0.16", optional = true }
4747
sqlparser = "0.16"

datafusion/core/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions"]
5555

5656
[dependencies]
5757
ahash = { version = "0.7", default-features = false }
58-
arrow = { version = "11.1", features = ["prettyprint"] }
58+
arrow = { version = "12", features = ["prettyprint"] }
5959
async-trait = "0.1.41"
6060
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
6161
chrono = { version = "0.4", default-features = false }
@@ -72,7 +72,7 @@ num-traits = { version = "0.2", optional = true }
7272
num_cpus = "1.13.0"
7373
ordered-float = "2.10"
7474
parking_lot = "0.12"
75-
parquet = { version = "11.1", features = ["arrow"] }
75+
parquet = { version = "12", features = ["arrow"] }
7676
paste = "^1.0"
7777
pin-project-lite= "^0.2.7"
7878
pyo3 = { version = "0.16", optional = true }

datafusion/core/fuzz-utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ edition = "2021"
2323
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2424

2525
[dependencies]
26-
arrow = { version = "11.1", features = ["prettyprint"] }
26+
arrow = { version = "12", features = ["prettyprint"] }
2727
env_logger = "0.9.0"
2828
rand = "0.8"

datafusion/core/src/physical_plan/file_format/json.rs

+14-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// under the License.
1717

1818
//! Execution plan for reading line-delimited JSON files
19+
use arrow::json::reader::DecoderOptions;
1920
use async_trait::async_trait;
2021

2122
use crate::error::{DataFusionError, Result};
@@ -102,12 +103,19 @@ impl ExecutionPlan for NdJsonExec {
102103

103104
// The json reader cannot limit the number of records, so `remaining` is ignored.
104105
let fun = move |file, _remaining: &Option<usize>| {
105-
Box::new(json::Reader::new(
106-
file,
107-
Arc::clone(&file_schema),
108-
batch_size,
109-
proj.clone(),
110-
)) as BatchIter
106+
// TODO: make DecoderOptions implement Clone so we can
107+
// clone here rather than recreating the options each time
108+
// https://github.com/apache/arrow-rs/issues/1580
109+
let options = DecoderOptions::new().with_batch_size(batch_size);
110+
111+
let options = if let Some(proj) = proj.clone() {
112+
options.with_projection(proj)
113+
} else {
114+
options
115+
};
116+
117+
Box::new(json::Reader::new(file, Arc::clone(&file_schema), options))
118+
as BatchIter
111119
};
112120

113121
Ok(Box::pin(FileStream::new(

datafusion/expr/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ path = "src/lib.rs"
3636

3737
[dependencies]
3838
ahash = { version = "0.7", default-features = false }
39-
arrow = { version = "11.1", features = ["prettyprint"] }
39+
arrow = { version = "12", features = ["prettyprint"] }
4040
datafusion-common = { path = "../common", version = "7.0.0" }
4141
sqlparser = "0.16"

datafusion/jit/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ path = "src/lib.rs"
3636
jit = []
3737

3838
[dependencies]
39-
arrow = { version = "11.1" }
39+
arrow = { version = "12" }
4040
cranelift = "0.82.0"
4141
cranelift-jit = "0.82.0"
4242
cranelift-module = "0.82.0"

datafusion/physical-expr/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unicode_expressions = ["unicode-segmentation"]
4040

4141
[dependencies]
4242
ahash = { version = "0.7", default-features = false }
43-
arrow = { version = "11.1", features = ["prettyprint"] }
43+
arrow = { version = "12", features = ["prettyprint"] }
4444
blake2 = { version = "^0.10.2", optional = true }
4545
blake3 = { version = "1.0", optional = true }
4646
chrono = { version = "0.4", default-features = false }

datafusion/proto/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ path = "src/lib.rs"
3636

3737
[dependencies]
3838
datafusion = { path = "../core", version = "7.0.0" }
39-
prost = "0.9"
39+
prost = "0.10"
4040

4141
[build-dependencies]
42-
tonic-build = { version = "0.6" }
42+
tonic-build = { version = "0.7" }

0 commit comments

Comments
 (0)