Skip to content
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

cargo fmt #166

Merged
merged 1 commit into from
Aug 10, 2022
Merged
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
3 changes: 1 addition & 2 deletions src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ pub fn decompress(compression: Compression, input_buf: &[u8], output_buf: &mut [
Compression::Lz4 => try_decompress_hadoop(input_buf, output_buf).or_else(|_| {
lz4_decompress_to_buffer(input_buf, Some(output_buf.len() as i32), output_buf)
.map(|_| {})
}
),
}),

#[cfg(all(not(feature = "lz4_flex"), not(feature = "lz4")))]
Compression::Lz4 => Err(Error::FeatureNotActive(
Expand Down
7 changes: 4 additions & 3 deletions tests/it/read/lz4_legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ fn verify_column_data(column: &str) -> Array {

#[test]
fn test_lz4_inference() -> Result<()> {

// - file "hadoop_lz4_compressed.parquet" is compressed using the hadoop Lz4Codec
// - file "non_hadoop_lz4_compressed.parquet" is "the LZ4 block format without the custom Hadoop header".
// see https://github.com/apache/parquet-testing/pull/14

// Those two files, are all marked as compressed as Lz4, the decompressor should
// be able to distinguish them from each other.

let files = ["hadoop_lz4_compressed.parquet", "non_hadoop_lz4_compressed.parquet"];
let files = [
"hadoop_lz4_compressed.parquet",
"non_hadoop_lz4_compressed.parquet",
];
let columns = ["c0", "c1", "v11"];
for file in files {
let mut path = get_path();
Expand All @@ -53,7 +55,6 @@ fn test_lz4_inference() -> Result<()> {

#[test]
fn test_lz4_large_file() -> Result<()> {

//File "hadoop_lz4_compressed_larger.parquet" is compressed using the hadoop Lz4Codec,
//which contains 10000 rows.

Expand Down