Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkharderdev committed Sep 29, 2022
1 parent 3fbb189 commit 7f45d3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 105 deletions.
102 changes: 0 additions & 102 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,108 +165,6 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

windows:
name: cargo test (win64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install protobuf compiler
shell: bash
run: |
mkdir -p $HOME/d/protoc
cd $HOME/d/protoc
export PROTO_ZIP="protoc-21.4-win64.zip"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP
unzip $PROTO_ZIP
export PATH=$PATH:$HOME/d/protoc/bin
protoc.exe --version
# TODO: this won't cache anything, which is expensive. Setup this action
# with a OS-dependent path.
- name: Setup Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
rustup component add rustfmt
- name: Run tests
shell: bash
run: |
export PATH=$PATH:$HOME/d/protoc/bin
cargo test
env:
# do not produce debug symbols to keep memory usage down
RUSTFLAGS: "-C debuginfo=0"

macos:
name: cargo test (mac)
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install protobuf compiler
shell: bash
run: |
mkdir -p $HOME/d/protoc
cd $HOME/d/protoc
export PROTO_ZIP="protoc-21.4-osx-x86_64.zip"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP
unzip $PROTO_ZIP
echo "$HOME/d/protoc/bin" >> $GITHUB_PATH
export PATH=$PATH:$HOME/d/protoc/bin
protoc --version
# TODO: this won't cache anything, which is expensive. Setup this action
# with a OS-dependent path.
- name: Setup Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
rustup component add rustfmt
- name: Run tests
shell: bash
run: |
cargo test
env:
# do not produce debug symbols to keep memory usage down
RUSTFLAGS: "-C debuginfo=0"

test-datafusion-pyarrow:
name: cargo test pyarrow (amd64)
needs: [linux-build-lib]
runs-on: ubuntu-latest
container:
image: amd64/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install PyArrow
run: |
echo "LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
python -m pip install pyarrow
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Run tests
run: |
cd datafusion
cargo test --features=pyarrow
lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl LineDelimiter {
} else if *is_quote {
None
} else {
(*v == NEWLINE).then(|| idx + 1)
(*v == NEWLINE).then_some(idx + 1)
}
});

Expand Down
4 changes: 2 additions & 2 deletions datafusion/core/src/physical_plan/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,12 +1240,12 @@ fn produce_from_matched(
let indices = if unmatched {
UInt64Array::from_iter_values(
(0..visited_left_side.len())
.filter_map(|v| (!visited_left_side.get_bit(v)).then(|| v as u64)),
.filter_map(|v| (!visited_left_side.get_bit(v)).then_some(v as u64)),
)
} else {
UInt64Array::from_iter_values(
(0..visited_left_side.len())
.filter_map(|v| (visited_left_side.get_bit(v)).then(|| v as u64)),
.filter_map(|v| (visited_left_side.get_bit(v)).then_some(v as u64)),
)
};

Expand Down

0 comments on commit 7f45d3d

Please sign in to comment.