Skip to content

Commit

Permalink
Clean up suggested by coderabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Oct 24, 2024
1 parent d0619b8 commit efc2260
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions components/core/src/clp_s/ArchiveReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ void ArchiveReader::read_metadata() {
SchemaReader::SchemaMetadata prev_metadata{};
int32_t prev_schema_id{};
for (size_t i = 0; i < num_schemas; ++i) {
size_t stream_id;
size_t stream_offset;
uint64_t stream_id;
uint64_t stream_offset;
int32_t schema_id;
size_t num_messages;
uint64_t num_messages;

if (auto error = m_table_metadata_decompressor.try_read_numeric_value(stream_id);
ErrorCodeSuccess != error)
Expand Down Expand Up @@ -97,7 +97,7 @@ void ArchiveReader::read_metadata() {
}

if (prev_metadata_initialized) {
size_t uncompressed_size{0};
uint64_t uncompressed_size{0};
if (stream_id != prev_metadata.stream_id) {
uncompressed_size
= m_stream_reader.get_uncompressed_stream_size(prev_metadata.stream_id)
Expand Down
10 changes: 5 additions & 5 deletions components/core/src/clp_s/ArchiveWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ size_t ArchiveWriter::store_tables() {
*/
using schema_map_it = decltype(m_id_to_schema_writer)::iterator;
std::vector<schema_map_it> schemas;
std::vector<std::tuple<size_t, size_t>> stream_metadata;
std::vector<std::tuple<size_t, size_t, int32_t, size_t>> schema_metadata;
std::vector<std::tuple<uint64_t, uint64_t>> stream_metadata;
std::vector<std::tuple<uint64_t, uint64_t, int32_t, uint64_t>> schema_metadata;

schema_metadata.reserve(m_id_to_schema_writer.size());
schemas.reserve(m_id_to_schema_writer.size());
Expand All @@ -194,9 +194,9 @@ size_t ArchiveWriter::store_tables() {
};
std::sort(schemas.begin(), schemas.end(), comp);

size_t current_stream_offset = 0;
size_t current_stream_id = 0;
size_t current_table_file_offset = 0;
uint64_t current_stream_offset = 0;
uint64_t current_stream_id = 0;
uint64_t current_table_file_offset = 0;
m_tables_compressor.open(m_tables_file_writer, m_compression_level);
for (auto it : schemas) {
it->second->store(m_tables_compressor);
Expand Down
8 changes: 4 additions & 4 deletions components/core/src/clp_s/SchemaReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class SchemaReader {
};

struct SchemaMetadata {
size_t stream_id;
size_t stream_offset;
size_t num_messages;
size_t uncompressed_size;
uint64_t stream_id;
uint64_t stream_offset;
uint64_t num_messages;
uint64_t uncompressed_size;
};

// Constructor
Expand Down

0 comments on commit efc2260

Please sign in to comment.