Skip to content

Commit

Permalink
Update to Arrow 12.0.0, update tonic and prost (apache#2253)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
alamb and dependabot[bot] authored Apr 19, 2022
1 parent 7334481 commit 7548e96
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 56 deletions.
39 changes: 39 additions & 0 deletions .github/actions/setup-builder/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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.

name: Prepare Rust Builder
description: 'Prepare Rust Build Environment'
inputs:
rust-version:
description: 'version of rust to install (e.g. stable)'
required: true
default: 'stable'
runs:
using: "composite"
steps:
- name: Install Build Dependencies
shell: bash
run: |
apt-get update
apt-get install -y protobuf-compiler
- name: Setup Rust toolchain
shell: bash
run: |
echo "Installing ${{ inputs.rust-version }}"
rustup toolchain install ${{ inputs.rust-version }}
rustup default ${{ inputs.rust-version }}
rustup component add rustfmt
42 changes: 20 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ jobs:
path: /github/home/target
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}-
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Build workspace in debug mode
run: |
cargo build
Expand Down Expand Up @@ -117,10 +116,9 @@ jobs:
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Run tests
run: |
export ARROW_TEST_DATA=$(pwd)/testing/data
Expand Down Expand Up @@ -285,10 +283,9 @@ jobs:
echo "LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
python -m pip install pyarrow
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Run tests
run: |
cd datafusion
Expand Down Expand Up @@ -343,10 +340,12 @@ jobs:
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Install Clippy
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt clippy
rustup component add clippy
- name: Run clippy
run: |
cargo clippy --all-targets --workspace -- -D warnings
Expand Down Expand Up @@ -420,10 +419,9 @@ jobs:
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Run tests
run: |
export ARROW_TEST_DATA=$(pwd)/testing/data
Expand Down Expand Up @@ -466,9 +464,9 @@ jobs:
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Install cargo-tomlfmt
run: |
which cargo-tomlfmt || cargo install cargo-tomlfmt
Expand Down
4 changes: 2 additions & 2 deletions ballista-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ ballista = { path = "../ballista/rust/client", version = "0.6.0" }
datafusion = { path = "../datafusion/core" }
futures = "0.3"
num_cpus = "1.13.0"
prost = "0.9"
prost = "0.10"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
tonic = "0.6"
tonic = "0.7"
10 changes: 5 additions & 5 deletions ballista/rust/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ simd = ["datafusion/simd"]
[dependencies]
ahash = { version = "0.7", default-features = false }

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

parking_lot = "0.12"
parse_arg = "0.1.3"
prost = "0.9"
prost-types = "0.9"
prost = "0.10"
prost-types = "0.10"
serde = { version = "1", features = ["derive"] }
sqlparser = "0.16"
tokio = "1.0"
tonic = "0.6"
tonic = "0.7"
uuid = { version = "0.8", features = ["v4"] }
walkdir = "2.3.2"

Expand All @@ -63,4 +63,4 @@ tempfile = "3"

[build-dependencies]
rustc_version = "0.4.0"
tonic-build = { version = "0.6" }
tonic-build = { version = "0.7" }
6 changes: 3 additions & 3 deletions ballista/rust/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ snmalloc = ["snmalloc-rs"]

[dependencies]
anyhow = "1"
arrow = { version = "11.1" }
arrow-flight = { version = "11.1" }
arrow = { version = "12" }
arrow-flight = { version = "12" }
async-trait = "0.1.41"
ballista-core = { path = "../core", version = "0.6.0" }
chrono = { version = "0.4", default-features = false }
Expand All @@ -49,7 +49,7 @@ snmalloc-rs = { version = "0.2", optional = true }
tempfile = "3"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "parking_lot"] }
tokio-stream = { version = "0.1", features = ["net"] }
tonic = "0.6"
tonic = "0.7"
uuid = { version = "0.8", features = ["v4"] }

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions ballista/rust/scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ clap = { version = "3", features = ["derive", "cargo"] }
configure_me = "0.4.0"
datafusion = { path = "../../../datafusion/core", version = "7.0.0" }
env_logger = "0.9"
etcd-client = { version = "0.8", optional = true }
etcd-client = { version = "0.9", optional = true }
futures = "0.3"
http = "0.2"
http-body = "0.4"
hyper = "0.14.4"
log = "0.4"
parking_lot = "0.12"
parse_arg = "0.1.3"
prost = "0.9"
prost = "0.10"
rand = "0.8"
serde = { version = "1", features = ["derive"] }
sled_package = { package = "sled", version = "0.34", optional = true }
tokio = { version = "1.0", features = ["full"] }
tokio-stream = { version = "0.1", features = ["net"], optional = true }
tonic = "0.6"
tonic = "0.7"
tower = { version = "0.4" }
warp = "0.3"

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

[build-dependencies]
configure_me_codegen = "0.4.1"
tonic-build = { version = "0.6" }
tonic-build = { version = "0.7" }
2 changes: 1 addition & 1 deletion datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repository = "https://github.com/apache/arrow-datafusion"
rust-version = "1.59"

[dependencies]
arrow = { version = "11.1" }
arrow = { version = "12" }
ballista = { path = "../ballista/rust/client", version = "0.6.0", optional = true }
clap = { version = "3", features = ["derive", "cargo"] }
datafusion = { path = "../datafusion/core", version = "7.0.0" }
Expand Down
6 changes: 3 additions & 3 deletions datafusion-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ path = "examples/avro_sql.rs"
required-features = ["datafusion/avro"]

[dev-dependencies]
arrow-flight = { version = "11.1" }
arrow-flight = { version = "12" }
async-trait = "0.1.41"
datafusion = { path = "../datafusion/core" }
futures = "0.3"
num_cpus = "1.13.0"
prost = "0.9"
prost = "0.10"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
tonic = "0.6"
tonic = "0.7"
4 changes: 2 additions & 2 deletions datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jit = ["cranelift-module"]
pyarrow = ["pyo3"]

[dependencies]
arrow = { version = "11.1", features = ["prettyprint"] }
arrow = { version = "12", features = ["prettyprint"] }
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
cranelift-module = { version = "0.82.0", optional = true }
ordered-float = "2.10"
parquet = { version = "11.1", features = ["arrow"], optional = true }
parquet = { version = "12", features = ["arrow"], optional = true }
pyo3 = { version = "0.16", optional = true }
sqlparser = "0.16"
4 changes: 2 additions & 2 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions"]

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "11.1", features = ["prettyprint"] }
arrow = { version = "12", features = ["prettyprint"] }
async-trait = "0.1.41"
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
chrono = { version = "0.4", default-features = false }
Expand All @@ -72,7 +72,7 @@ num-traits = { version = "0.2", optional = true }
num_cpus = "1.13.0"
ordered-float = "2.10"
parking_lot = "0.12"
parquet = { version = "11.1", features = ["arrow"] }
parquet = { version = "12", features = ["arrow"] }
paste = "^1.0"
pin-project-lite= "^0.2.7"
pyo3 = { version = "0.16", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/fuzz-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { version = "11.1", features = ["prettyprint"] }
arrow = { version = "12", features = ["prettyprint"] }
env_logger = "0.9.0"
rand = "0.8"
20 changes: 14 additions & 6 deletions datafusion/core/src/physical_plan/file_format/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

//! Execution plan for reading line-delimited JSON files
use arrow::json::reader::DecoderOptions;
use async_trait::async_trait;

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

// The json reader cannot limit the number of records, so `remaining` is ignored.
let fun = move |file, _remaining: &Option<usize>| {
Box::new(json::Reader::new(
file,
Arc::clone(&file_schema),
batch_size,
proj.clone(),
)) as BatchIter
// TODO: make DecoderOptions implement Clone so we can
// clone here rather than recreating the options each time
// https://github.com/apache/arrow-rs/issues/1580
let options = DecoderOptions::new().with_batch_size(batch_size);

let options = if let Some(proj) = proj.clone() {
options.with_projection(proj)
} else {
options
};

Box::new(json::Reader::new(file, Arc::clone(&file_schema), options))
as BatchIter
};

Ok(Box::pin(FileStream::new(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ path = "src/lib.rs"

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "11.1", features = ["prettyprint"] }
arrow = { version = "12", features = ["prettyprint"] }
datafusion-common = { path = "../common", version = "7.0.0" }
sqlparser = "0.16"
2 changes: 1 addition & 1 deletion datafusion/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ path = "src/lib.rs"
jit = []

[dependencies]
arrow = { version = "11.1" }
arrow = { version = "12" }
cranelift = "0.82.0"
cranelift-jit = "0.82.0"
cranelift-module = "0.82.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ unicode_expressions = ["unicode-segmentation"]

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "11.1", features = ["prettyprint"] }
arrow = { version = "12", features = ["prettyprint"] }
blake2 = { version = "^0.10.2", optional = true }
blake3 = { version = "1.0", optional = true }
chrono = { version = "0.4", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions datafusion/proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ path = "src/lib.rs"

[dependencies]
datafusion = { path = "../core", version = "7.0.0" }
prost = "0.9"
prost = "0.10"

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

0 comments on commit 7548e96

Please sign in to comment.