Skip to content

Commit

Permalink
Move LZ4 codec from arrow to velox parquet writer
Browse files Browse the repository at this point in the history
  • Loading branch information
nmahadevuni committed Oct 9, 2023
1 parent 36f9621 commit 9711ddf
Show file tree
Hide file tree
Showing 3 changed files with 624 additions and 12 deletions.
4 changes: 2 additions & 2 deletions velox/dwio/parquet/writer/arrow/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
add_library(
velox_dwio_arrow_parquet_writer_util_lib
Compression.cpp CompressionSnappy.cpp Hashing.cpp Crc32.cpp
CompressionZstd.cpp)
CompressionZstd.cpp CompressionLZ4.cpp)

target_link_libraries(velox_dwio_arrow_parquet_writer_util_lib parquet arrow
Snappy::snappy zstd::zstd)
Snappy::snappy zstd::zstd lz4::lz4)
10 changes: 0 additions & 10 deletions velox/dwio/parquet/writer/arrow/util/Compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,13 @@ Result<std::unique_ptr<Codec>> Codec::Create(
break;
}
case Compression::LZ4:
#ifdef ARROW_WITH_LZ4
codec = internal::MakeLz4RawCodec(compression_level);
#endif
break;
case Compression::LZ4_FRAME:
#ifdef ARROW_WITH_LZ4
codec = internal::MakeLz4FrameCodec(compression_level);
#endif
break;
case Compression::LZ4_HADOOP:
#ifdef ARROW_WITH_LZ4
codec = internal::MakeLz4HadoopRawCodec();
#endif
break;
case Compression::ZSTD:
codec = internal::MakeZSTDCodec(compression_level);
Expand Down Expand Up @@ -256,11 +250,7 @@ bool Codec::IsAvailable(Compression::type codec_type) {
case Compression::LZ4:
case Compression::LZ4_FRAME:
case Compression::LZ4_HADOOP:
#ifdef ARROW_WITH_LZ4
return true;
#else
return false;
#endif
case Compression::ZSTD:
return true;
case Compression::BZ2:
Expand Down
Loading

0 comments on commit 9711ddf

Please sign in to comment.