Skip to content

Commit

Permalink
Removed unused feature (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao authored May 31, 2022
1 parent 792a419 commit c6e5b34
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Run
run: cargo test
- name: Run lz4-flex
run: cargo test --no-default-features --features lz4_flex,bloom_filter,stream,snappy,brotli,zstd,gzip
run: cargo test --no-default-features --features lz4_flex,bloom_filter,snappy,brotli,zstd,gzip

clippy:
name: Clippy
Expand Down
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ parquet-format-async-temp = "0.3.0"
bitpacking = { version = "0.8.2", default-features = false, features = ["bitpacker1x"] }
streaming-decompression = "0.1"

async-stream = { version = "0.3.2", optional = true }
futures = { version = "0.3", optional = true }
async-stream = { version = "0.3.2" }
futures = { version = "0.3" }

snap = { version = "^1.0", optional = true }
brotli = { version = "^3.3", optional = true }
Expand All @@ -36,10 +36,9 @@ tokio = { version = "1", features = ["macros", "rt"] }
criterion = "0.3"

[features]
default = ["snappy", "gzip", "lz4", "zstd", "brotli", "stream", "bloom_filter"]
default = ["snappy", "gzip", "lz4", "zstd", "brotli", "bloom_filter"]
snappy = ["snap"]
gzip = ["flate2"]
stream = ["futures", "async-stream"]
bloom_filter = ["xxhash-rust"]

[[bench]]
Expand Down
4 changes: 2 additions & 2 deletions src/encoding/delta_bitpacked/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::super::zigzag_leb128;
struct Block<'a> {
// this is the minimum delta that must be added to every value.
min_delta: i64,
num_mini_blocks: usize,
_num_mini_blocks: usize,
values_per_mini_block: usize,
bitwidths: &'a [u8],
values: &'a [u8],
Expand Down Expand Up @@ -40,7 +40,7 @@ impl<'a> Block<'a> {

let mut block = Block {
min_delta,
num_mini_blocks,
_num_mini_blocks: num_mini_blocks,
values_per_mini_block,
bitwidths,
remaining: length,
Expand Down
3 changes: 0 additions & 3 deletions src/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ mod indexes;
pub mod levels;
mod metadata;
mod page;
#[cfg(feature = "stream")]
mod stream;

use std::io::{Read, Seek, SeekFrom};
Expand All @@ -12,10 +11,8 @@ use std::vec::IntoIter;

pub use compression::{decompress, BasicDecompressor, Decompressor};
pub use metadata::read_metadata;
#[cfg(feature = "stream")]
pub use page::get_page_stream;
pub use page::{IndexedPageReader, PageFilter, PageIterator, PageMetaData, PageReader};
#[cfg(feature = "stream")]
pub use stream::read_metadata as read_metadata_async;

use crate::error::Error;
Expand Down
2 changes: 0 additions & 2 deletions src/read/page/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mod indexed_reader;
mod reader;
#[cfg(feature = "stream")]
mod stream;

use crate::{error::Error, page::CompressedDataPage};
Expand All @@ -12,5 +11,4 @@ pub trait PageIterator: Iterator<Item = Result<CompressedDataPage, Error>> {
fn swap_buffer(&mut self, buffer: &mut Vec<u8>);
}

#[cfg(feature = "stream")]
pub use stream::get_page_stream;
2 changes: 0 additions & 2 deletions src/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ pub(crate) mod page;
mod row_group;
pub(self) mod statistics;

#[cfg(feature = "stream")]
mod stream;
#[cfg(feature = "stream")]
pub use stream::FileStreamer;

mod dyn_iter;
Expand Down
8 changes: 2 additions & 6 deletions src/write/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,8 @@ mod tests {

#[test]
fn dict_too_many_values() {
let page = CompressedDictPage::new(
vec![],
Compression::Uncompressed,
0,
i32::MAX as usize + 1,
);
let page =
CompressedDictPage::new(vec![], Compression::Uncompressed, 0, i32::MAX as usize + 1);
assert!(assemble_dict_page_header(&page).is_err());
}
}
1 change: 1 addition & 0 deletions tests/it/read/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ where

/// The deserialization state of a `DataPage` of `Primitive` parquet primitive type
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum PageState<'a, T>
where
T: NativeType,
Expand Down

0 comments on commit c6e5b34

Please sign in to comment.