Skip to content

Commit

Permalink
Compression enum typo (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincev authored Sep 4, 2021
1 parent 1d310ee commit 83c3325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn create_codec(codec: &Compression) -> Result<Option<Box<dyn Codec>>> {
#[cfg(feature = "lz4")]
Compression::Lz4 => Ok(Some(Box::new(Lz4Codec::new()))),
#[cfg(feature = "zstd")]
Compression::Zsld => Ok(Some(Box::new(ZstdCodec::new()))),
Compression::Zstd => Ok(Some(Box::new(ZstdCodec::new()))),
Compression::Uncompressed => Ok(None),
_ => Err(general_err!("Compression {:?} is not installed", codec)),
}
Expand Down Expand Up @@ -329,6 +329,6 @@ mod tests {

#[test]
fn test_codec_zstd() {
test_codec(Compression::Zsld);
test_codec(Compression::Zstd);
}
}
6 changes: 3 additions & 3 deletions src/parquet_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub enum Compression {
Lzo,
Brotli,
Lz4,
Zsld,
Zstd,
}

impl TryFrom<CompressionCodec> for Compression {
Expand All @@ -62,7 +62,7 @@ impl TryFrom<CompressionCodec> for Compression {
CompressionCodec::LZO => Compression::Lzo,
CompressionCodec::BROTLI => Compression::Brotli,
CompressionCodec::LZ4 => Compression::Lz4,
CompressionCodec::ZSTD => Compression::Zsld,
CompressionCodec::ZSTD => Compression::Zstd,
_ => return Err(ParquetError::OutOfSpec("Thrift out of range".to_string())),
})
}
Expand All @@ -77,7 +77,7 @@ impl From<Compression> for CompressionCodec {
Compression::Lzo => CompressionCodec::LZO,
Compression::Brotli => CompressionCodec::BROTLI,
Compression::Lz4 => CompressionCodec::LZ4,
Compression::Zsld => CompressionCodec::ZSTD,
Compression::Zstd => CompressionCodec::ZSTD,
}
}
}
Expand Down

0 comments on commit 83c3325

Please sign in to comment.