diff --git a/src/paimon/common/compression/block_compressor.h b/src/paimon/common/compression/block_compressor.h index 07d2238f..e1f43ba1 100644 --- a/src/paimon/common/compression/block_compressor.h +++ b/src/paimon/common/compression/block_compressor.h @@ -29,31 +29,25 @@ class BlockCompressor { virtual ~BlockCompressor() = default; public: - /** - * Get the max compressed size for a given original size. - * @param src_size The original size - * @return The max compressed size - */ + /// Get the max compressed size for a given original size. + /// @param src_size The original size + /// @return The max compressed size virtual int32_t GetMaxCompressedSize(int32_t src_size) = 0; - /** - * Compress data read from src, and write the compressed data to dst. - * - * @param src Uncompressed data to read from - * @param src_length The length of data which want to be compressed - * @param dst The target to write compressed data - * @param dst_length The max length of data - * @return Length of compressed data - */ /// Compress data read from src, and write the compressed data to dst. + /// + /// @param src Uncompressed data to read from + /// @param src_length The length of data which want to be compressed + /// @param dst The target to write compressed data + /// @param dst_length The max length of data + /// @return Length of compressed data virtual Result Compress(const char* src, int32_t src_length, char* dst, int32_t dst_length) = 0; public: - /** - * We put two integers before each compressed block, the first integer represents the compressed - * length of the block, and the second one represents the original length of the block. - */ + /// We put two integers before each compressed block, the first integer represents the + /// compressed length of the block, and the second one represents the original length of the + /// block. static constexpr int32_t HEADER_LENGTH = 8; }; } // namespace paimon diff --git a/src/paimon/common/compression/block_decompressor.h b/src/paimon/common/compression/block_decompressor.h index 56ef1587..34c72d3c 100644 --- a/src/paimon/common/compression/block_decompressor.h +++ b/src/paimon/common/compression/block_decompressor.h @@ -31,15 +31,13 @@ class BlockDecompressor { virtual ~BlockDecompressor() = default; public: - /** - * Decompress data read from src, and write the decompressed data to dst. - * - * @param src Compressed data to read from - * @param src_length The length of data which want to be decompressed - * @param dst The target to write decompressed data - * @param dst_length The max length of data - * @return Length of decompressed data - */ + /// Decompress data read from src, and write the decompressed data to dst. + /// + /// @param src Compressed data to read from + /// @param src_length The length of data which want to be decompressed + /// @param dst The target to write decompressed data + /// @param dst_length The max length of data + /// @return Length of decompressed data virtual Result Decompress(const char* src, int32_t src_length, char* dst, int32_t dst_length) = 0; diff --git a/src/paimon/common/sst/sst_file_reader.h b/src/paimon/common/sst/sst_file_reader.h index f1fd36fd..02381cdd 100644 --- a/src/paimon/common/sst/sst_file_reader.h +++ b/src/paimon/common/sst/sst_file_reader.h @@ -46,30 +46,24 @@ class SstFileReader { std::unique_ptr CreateIterator(); - /** - * Lookup the specified key in the file. - * - * @param key serialized key - * @return corresponding serialized value, nullptr if not found. - */ + /// Lookup the specified key in the file. + /// + /// @param key serialized key + /// @return corresponding serialized value, nullptr if not found. Result> Lookup(const std::shared_ptr& key); Result> GetNextBlock( std::unique_ptr& index_iterator); - /** - * @param handle The block handle. - * @param index Whether read the block as an index. - * @return The reader of the target block. - */ + /// @param handle The block handle. + /// @param index Whether read the block as an index. + /// @return The reader of the target block. Result> ReadBlock(std::shared_ptr&& handle, bool index); - /** - * @param handle The block handle. - * @param index Whether read the block as an index. - * @return The reader of the target block. - */ + /// @param handle The block handle. + /// @param index Whether read the block as an index. + /// @return The reader of the target block. Result> ReadBlock(const std::shared_ptr& handle, bool index); @@ -98,10 +92,8 @@ class SstFileIterator { public: SstFileIterator(SstFileReader* reader, std::unique_ptr index_iterator); - /** - * Seek to the position of the record whose key is exactly equal to or greater than the - * specified key. - */ + /// Seek to the position of the record whose key is exactly equal to or greater than the + /// specified key. Status SeekTo(const std::shared_ptr& key); private: diff --git a/src/paimon/common/utils/crc32c.h b/src/paimon/common/utils/crc32c.h index d1998042..f2df97ec 100644 --- a/src/paimon/common/utils/crc32c.h +++ b/src/paimon/common/utils/crc32c.h @@ -32,14 +32,12 @@ class PAIMON_EXPORT CRC32C { private: #if defined(PAIMON_HAVE_SSE4_2) - /** - * Simd implementation for crc32c. - * - * @param data data to be calculated - * @param length length of data - * @param crc initial crc value - * @return crc32c value - */ + /// Simd implementation for crc32c. + /// + /// @param data data to be calculated + /// @param length length of data + /// @param crc initial crc value + /// @return crc32c value static uint32_t crc32c_hw(const char* data, size_t length, uint32_t crc); #endif };