Skip to content

Commit 9d8f700

Browse files
authored
Break parquet CI into its own workflow, standardize step names (#2190)
* Break out parquet CI into its own workflow * Fix up clippy * Complete clippy move * Remove linux test * Fix arrow clippy features * Update .github/workflows/parquet.yml
1 parent 7199b1b commit 9d8f700

File tree

6 files changed

+174
-83
lines changed

6 files changed

+174
-83
lines changed

.github/workflows/arrow.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
uses: ./.github/actions/setup-builder
4646
with:
4747
rust-version: stable
48-
- name: Test default features
48+
- name: Test
4949
run: |
5050
cargo test -p arrow
51-
- name: Test all supported features
51+
- name: Test --features=force_validate,prettyprint
5252
run: |
5353
cargo test -p arrow --features=force_validate,prettyprint
5454
- name: Run examples
@@ -61,7 +61,7 @@ jobs:
6161
6262
# test compilaton features
6363
linux-features:
64-
name: Feature Compatibility
64+
name: Check Compilation
6565
runs-on: ubuntu-latest
6666
container:
6767
image: amd64/rust
@@ -77,14 +77,23 @@ jobs:
7777
uses: ./.github/actions/setup-builder
7878
with:
7979
rust-version: stable
80-
- name: Test compilation with different features
80+
- name: Check compilation
81+
run: |
82+
cargo check -p arrow
83+
- name: Check compilation --no-default-features
8184
run: |
8285
cargo check -p arrow --no-default-features
86+
- name: Check compilation --all-targets
87+
run: |
8388
cargo check -p arrow --all-targets
89+
- name: Check compilation --no-default-features --all-targets
90+
run: |
8491
cargo check -p arrow --no-default-features --all-targets
92+
- name: Check compilation --no-default-features --all-targets --features test_utils
93+
run: |
8594
cargo check -p arrow --no-default-features --all-targets --features test_utils
8695
87-
# test the --features "simd" of the arrow crate. This requires nightly.
96+
# test the --features "simd" of the arrow crate. This requires nightly Rust.
8897
linux-test-simd:
8998
name: Test SIMD on AMD64 Rust ${{ matrix.rust }}
9099
runs-on: ubuntu-latest
@@ -102,12 +111,14 @@ jobs:
102111
uses: ./.github/actions/setup-builder
103112
with:
104113
rust-version: nightly
105-
- name: Run tests
114+
- name: Run tests --features "simd"
106115
run: |
107116
cargo test -p arrow --features "simd"
108-
- name: Check compilation with simd features
117+
- name: Check compilation --features "simd"
109118
run: |
110119
cargo check -p arrow --features simd
120+
- name: Check compilation --features simd --all-targets
121+
run: |
111122
cargo check -p arrow --features simd --all-targets
112123
113124
@@ -158,4 +169,4 @@ jobs:
158169
rustup component add clippy
159170
- name: Run clippy
160171
run: |
161-
cargo clippy -p arrow --features test_common --features prettyprint --features=async --all-targets --workspace -- -D warnings
172+
cargo clippy -p arrow --features=prettyprint,csv,ipc,test_utils --all-targets -- -D warnings

.github/workflows/arrow_flight.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,27 @@ jobs:
4141
uses: ./.github/actions/setup-builder
4242
with:
4343
rust-version: stable
44-
- name: Tests with default features
44+
- name: Test
4545
run: |
4646
cargo test -p arrow-flight
47-
- name: Tests with all features
47+
- name: Test --all-features
4848
run: |
4949
cargo test -p arrow-flight --all-features
50+
51+
clippy:
52+
name: Clippy
53+
runs-on: ubuntu-latest
54+
container:
55+
image: amd64/rust
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Setup Rust toolchain
59+
uses: ./.github/actions/setup-builder
60+
with:
61+
rust-version: stable
62+
- name: Setup Clippy
63+
run: |
64+
rustup component add clippy
65+
- name: Run clippy
66+
run: |
67+
cargo clippy -p arrow-flight --all-features -- -D warnings

.github/workflows/parquet.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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+
---
19+
# tests for parquet crate
20+
name: "parquet"
21+
22+
on:
23+
pull_request:
24+
25+
jobs:
26+
# test the crate
27+
linux-test:
28+
name: Test
29+
runs-on: ubuntu-latest
30+
container:
31+
image: amd64/rust
32+
env:
33+
# Disable full debug symbol generation to speed up CI build and keep memory down
34+
# "1" means line tables only, which is useful for panic tracebacks.
35+
RUSTFLAGS: "-C debuginfo=1"
36+
steps:
37+
- uses: actions/checkout@v2
38+
with:
39+
submodules: true
40+
- name: Setup Rust toolchain
41+
uses: ./.github/actions/setup-builder
42+
with:
43+
rust-version: stable
44+
- name: Test
45+
run: |
46+
cargo test -p parquet
47+
- name: Test --all-features
48+
run: |
49+
cargo test -p parquet --all-features
50+
51+
52+
# test compilaton
53+
linux-features:
54+
name: Check Compilation
55+
runs-on: ubuntu-latest
56+
container:
57+
image: amd64/rust
58+
env:
59+
# Disable full debug symbol generation to speed up CI build and keep memory down
60+
# "1" means line tables only, which is useful for panic tracebacks.
61+
RUSTFLAGS: "-C debuginfo=1"
62+
steps:
63+
- uses: actions/checkout@v2
64+
with:
65+
submodules: true
66+
- name: Setup Rust toolchain
67+
uses: ./.github/actions/setup-builder
68+
with:
69+
rust-version: stable
70+
- name: Check compilation
71+
run: |
72+
cargo check -p parquet
73+
- name: Check compilation --no-default-features
74+
run: |
75+
cargo check -p parquet --no-default-features
76+
- name: Check compilation --no-default-features --features arrow
77+
run: |
78+
cargo check -p parquet --no-default-features --features arrow
79+
- name: Check compilation --no-default-features --all-features
80+
run: |
81+
cargo check -p parquet --all-features
82+
- name: Check compilation --all-targets
83+
run: |
84+
cargo check -p parquet --all-targets
85+
- name: Check compilation --no-default-features --all-targets
86+
run: |
87+
cargo check -p parquet --no-default-features --all-targets
88+
- name: Check compilation --no-default-features --features-arrow --all-targets
89+
run: |
90+
cargo check -p parquet --no-default-features --features arrow --all-targets
91+
92+
clippy:
93+
name: Clippy
94+
runs-on: ubuntu-latest
95+
container:
96+
image: amd64/rust
97+
steps:
98+
- uses: actions/checkout@v2
99+
- name: Setup Rust toolchain
100+
uses: ./.github/actions/setup-builder
101+
with:
102+
rust-version: stable
103+
- name: Setup Clippy
104+
run: |
105+
rustup component add clippy
106+
- name: Run clippy
107+
run: |
108+
# Only run clippy for the library at this time,
109+
# as there are clippy errors for other targets
110+
cargo clippy -p parquet --all-features --lib -- -D warnings
111+
# https://github.com/apache/arrow-rs/issues/1254
112+
#cargo clippy -p parquet --all-targets --all-features -- -D warnings

.github/workflows/parquet_derive.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ jobs:
4141
uses: ./.github/actions/setup-builder
4242
with:
4343
rust-version: stable
44-
- name: Test crate
44+
- name: Test
4545
run: |
4646
cargo test -p parquet_derive
47+
48+
clippy:
49+
name: Clippy
50+
runs-on: ubuntu-latest
51+
container:
52+
image: amd64/rust
53+
steps:
54+
- uses: actions/checkout@v2
55+
- name: Setup Rust toolchain
56+
uses: ./.github/actions/setup-builder
57+
with:
58+
rust-version: stable
59+
- name: Setup Clippy
60+
run: |
61+
rustup component add clippy
62+
- name: Run clippy
63+
run: |
64+
cargo clippy -p parquet_derive --all-features -- -D warnings

.github/workflows/rust.yml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,6 @@ on:
2626

2727
jobs:
2828

29-
# test the crate
30-
linux-test:
31-
name: Test Workspace on AMD64 Rust ${{ matrix.rust }}
32-
runs-on: ubuntu-latest
33-
strategy:
34-
matrix:
35-
arch: [ amd64 ]
36-
rust: [ stable ]
37-
container:
38-
image: ${{ matrix.arch }}/rust
39-
env:
40-
# Disable full debug symbol generation to speed up CI build and keep memory down
41-
# "1" means line tables only, which is useful for panic tracebacks.
42-
RUSTFLAGS: "-C debuginfo=1"
43-
ARROW_TEST_DATA: /__w/arrow-rs/arrow-rs/testing/data
44-
PARQUET_TEST_DATA: /__w/arrow-rs/arrow-rs/parquet-testing/data
45-
steps:
46-
- uses: actions/checkout@v2
47-
with:
48-
submodules: true
49-
- name: Setup Rust toolchain
50-
uses: ./.github/actions/setup-builder
51-
with:
52-
rust-version: ${{ matrix.rust }}
53-
- name: Run tests
54-
run: |
55-
# run tests on all workspace members with default feature list
56-
cargo test
57-
- name: Re-run tests on parquet crate with all features
58-
run: |
59-
cargo test -p parquet --all-features
60-
- name: Test compilation of parquet library crate with different feature combinations
61-
run: |
62-
cargo check -p parquet
63-
cargo check -p parquet --no-default-features
64-
cargo check -p parquet --no-default-features --features arrow
65-
cargo check -p parquet --all-features
66-
- name: Test compilation of parquet targets with different feature combinations
67-
run: |
68-
cargo check -p parquet --all-targets
69-
cargo check -p parquet --no-default-features --all-targets
70-
cargo check -p parquet --no-default-features --features arrow --all-targets
71-
72-
7329
windows-and-macos:
7430
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }}
7531
runs-on: ${{ matrix.os }}
@@ -94,34 +50,6 @@ jobs:
9450
export RUSTFLAGS="-C debuginfo=0"
9551
cargo test
9652
97-
clippy:
98-
name: Clippy
99-
runs-on: ubuntu-latest
100-
strategy:
101-
matrix:
102-
arch: [ amd64 ]
103-
rust: [ stable ]
104-
container:
105-
image: ${{ matrix.arch }}/rust
106-
env:
107-
# Disable full debug symbol generation to speed up CI build and keep memory down
108-
# "1" means line tables only, which is useful for panic tracebacks.
109-
RUSTFLAGS: "-C debuginfo=1"
110-
steps:
111-
- uses: actions/checkout@v2
112-
with:
113-
submodules: true
114-
- name: Setup Rust toolchain
115-
uses: ./.github/actions/setup-builder
116-
with:
117-
rust-version: ${{ matrix.rust }}
118-
- name: Setup Clippy
119-
run: |
120-
rustup component add clippy
121-
- name: Run clippy
122-
run: |
123-
cargo clippy --features test_common --features prettyprint --features=async --all-targets --workspace -- -D warnings
124-
12553
check_benches:
12654
name: Check Benchmarks (but don't run them)
12755
runs-on: ubuntu-latest

parquet/src/encodings/rle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ impl RleEncoder {
182182
self.bit_writer.bytes_written()
183183
}
184184

185+
pub fn is_empty(&self) -> bool {
186+
self.bit_writer.bytes_written() == 0
187+
}
188+
185189
#[inline]
186190
pub fn consume(mut self) -> Result<Vec<u8>> {
187191
self.flush()?;

0 commit comments

Comments
 (0)