Skip to content

chore: Support Rust 1.88 (stable) #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: cube
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/comment_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Arrow
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: apache/arrow
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Archery and Crossbow dependencies
Expand All @@ -54,7 +54,7 @@ jobs:
if: startsWith(github.event.comment.body, '@github-actions rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: r-lib/actions/pr-fetch@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Arrow
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: apache/arrow
submodules: true
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Setup Archery
Expand All @@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Audit licenses
Expand All @@ -55,8 +55,8 @@ jobs:
name: Use prettier to check formatting of documents
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "14"
- name: Prettier check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: Process
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Assign GitHub labels
if: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
python-version: ["3.6", "3.7", "3.8", "3.9"]
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -59,7 +59,7 @@ jobs:
run: find ./python/target/wheels/

- name: Archive wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: python/target/wheels/*
Expand All @@ -68,11 +68,11 @@ jobs:
name: Manylinux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build wheels
run: docker run --rm -v $(pwd):/io konstin2/maturin build --release --manylinux
- name: Archive wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: python/target/wheels/*
Expand All @@ -82,7 +82,7 @@ jobs:
needs: [build-manylinux, build-python-mac-win]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: |
rustup toolchain install nightly-2022-11-03
rustup default nightly-2022-11-03
rustup component add rustfmt
- name: Cache Cargo
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /home/runner/.cargo
key: cargo-maturin-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /home/runner/target
key: target-maturin-cache-
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install Python dependencies
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ jobs:
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v2
uses: actions/cache@v4
with:
# these represent dependencies downloaded by cargo
# and thus do not depend on the OS, arch nor rust version.
path: /github/home/.cargo
key: cargo-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
# these represent compiled steps of both dependencies and arrow
# and thus are specific for a particular OS, arch and rust version.
Expand Down Expand Up @@ -81,17 +81,17 @@ jobs:
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /github/home/target
# this key equals the ones on `linux-build-lib` for re-use
Expand Down Expand Up @@ -145,10 +145,10 @@ jobs:
# --health-timeout 5s
# --health-retries 5
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: actions/setup-python@v2
# - uses: actions/setup-python@v5
# with:
# python-version: "3.8"
# - name: Install Python dependencies
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
os: [macos-latest]
rust: [nightly-2024-01-29]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
# TODO: this won't cache anything, which is expensive. Setup this action
Expand All @@ -227,7 +227,7 @@ jobs:
container:
image: amd64/rust
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup toolchain
run: |
rustup toolchain install nightly-2024-01-29
Expand All @@ -251,17 +251,17 @@ jobs:
# # "1" means line tables only, which is useful for panic tracebacks.
# RUSTFLAGS: "-C debuginfo=1"
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: Cache Cargo
# uses: actions/cache@v2
# uses: actions/cache@v4
# with:
# path: /github/home/.cargo
# # this key equals the ones on `linux-build-lib` for re-use
# key: cargo-cache-
# - name: Cache Rust dependencies
# uses: actions/cache@v2
# uses: actions/cache@v4
# with:
# path: /github/home/target
# # this key equals the ones on `linux-build-lib` for re-use
Expand All @@ -286,10 +286,10 @@ jobs:
# arch: [amd64]
# rust: [nightly-2021-07-04]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: actions/cache@v2
# - uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/registry
Expand Down Expand Up @@ -322,17 +322,17 @@ jobs:
# arch: [amd64]
# rust: [nightly-2021-07-04]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: Cache Cargo
# uses: actions/cache@v2
# uses: actions/cache@v4
# with:
# path: /home/runner/.cargo
# # this key is not equal because the user is different than on a container (runner vs github)
# key: cargo-coverage-cache-
# - name: Cache Rust dependencies
# uses: actions/cache@v2
# uses: actions/cache@v4
# with:
# path: /home/runner/target
# # this key is not equal because coverage uses different compilation flags.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ rusty-tags.vi

.vscode
venv/*
.claude
CLAUDE.md
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

[workspace]
resolver = "2"
members = [
"datafusion",
"datafusion-cli",
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/cube_ext/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ macro_rules! cube_match_scalar {
ScalarValue::TimestampSecond(v) => ($matcher!($($arg ,)* v, TimestampSecondBuilder)),
ScalarValue::IntervalYearMonth(v) => ($matcher!($($arg ,)* v, IntervalYearMonthBuilder)),
ScalarValue::IntervalDayTime(v) => ($matcher!($($arg ,)* v, IntervalDayTimeBuilder)),
ScalarValue::List(v, box dt) => ($matcher!($($arg ,)* v, dt, ListBuilder)),
ScalarValue::List(v, dt) => ($matcher!($($arg ,)* v, &**dt, ListBuilder)),
ScalarValue::Binary(v) => ($matcher!($($arg ,)* v, BinaryBuilder)),
ScalarValue::LargeBinary(v) => ($matcher!($($arg ,)* v, LargeBinaryBuilder)),
}
Expand Down
1 change: 0 additions & 1 deletion datafusion/src/datasource/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ mod tests {
use super::*;
use arrow::array::{
BinaryArray, BooleanArray, Float32Array, Float64Array, Int32Array,
TimestampNanosecondArray,
};
use arrow::record_batch::RecordBatch;
use futures::StreamExt;
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ impl ExecutionContext {
let handle: JoinHandle<Result<()>> = task::spawn(async move {
stream
.map(|batch| writer.write(&batch?))
.try_collect()
.try_collect::<()>()
.await
.map_err(DataFusionError::from)?;
writer.close().map_err(DataFusionError::from).map(|_| ())
Expand Down
1 change: 0 additions & 1 deletion datafusion/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(box_patterns)]
// 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
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/physical_plan/hash_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,10 +1371,10 @@ pub(crate) fn append_value(b: &mut dyn ArrayBuilder, v: &ScalarValue) -> Result<
.expect("invalid list builder");
let vs = match $list {
None => return Ok(b.append(false)?),
Some(box vs) => vs,
Some(vs) => vs,
};
let values_builder = b.values();
for v in vs {
for v in &**vs {
append_value(values_builder, v)?;
}
Ok(b.append(true)?)
Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.88.0"
components = ["rustfmt", "clippy"]
profile = "minimal"
Loading