diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b9a3311a7fb0..4325a0a060d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 diff --git a/datafusion/core/src/physical_plan/file_format/delimited_stream.rs b/datafusion/core/src/physical_plan/file_format/delimited_stream.rs index 1b6e30a9464e..68878da08670 100644 --- a/datafusion/core/src/physical_plan/file_format/delimited_stream.rs +++ b/datafusion/core/src/physical_plan/file_format/delimited_stream.rs @@ -68,7 +68,7 @@ impl LineDelimiter { } else if *is_quote { None } else { - (*v == NEWLINE).then(|| idx + 1) + (*v == NEWLINE).then_some(idx + 1) } }); diff --git a/datafusion/core/src/physical_plan/hash_join.rs b/datafusion/core/src/physical_plan/hash_join.rs index 8cb7445a24dd..a22bcbc13c7e 100644 --- a/datafusion/core/src/physical_plan/hash_join.rs +++ b/datafusion/core/src/physical_plan/hash_join.rs @@ -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)), ) };