Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Oct 31, 2024
1 parent 67650d2 commit 5f0bb06
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions velox/row/CompactRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ int32_t CompactRow::serialize(vector_size_t index, char* buffer) {
void CompactRow::serialize(
vector_size_t offset,
vector_size_t size,
char* buffer,
const size_t* bufferOffsets) {
const size_t* bufferOffsets,
char* buffer) {
serializeRow(offset, size, buffer, bufferOffsets);
}

Expand Down
4 changes: 2 additions & 2 deletions velox/row/CompactRow.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class CompactRow {
void serialize(
vector_size_t offset,
vector_size_t size,
char* buffer,
const size_t* bufferOffsets);
const size_t* bufferOffsets,
char* buffer);

/// Deserializes multiple rows into a RowVector of specified type. The type
/// must match the contents of the serialized rows.
Expand Down
2 changes: 1 addition & 1 deletion velox/row/benchmarks/UnsafeRowSerializeBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class SerializeBenchmark {
const std::vector<size_t>& rowSize,
const std::vector<size_t>& offsets) {
auto rawBuffer = buffer->asMutable<char>();
compactRow.serialize(0, numRows, rawBuffer, offsets.data());
compactRow.serialize(0, numRows, offsets.data(), rawBuffer);

std::vector<std::string_view> serialized;
for (auto i = 0; i < numRows; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion velox/row/tests/CompactRowTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class CompactRowTest : public ::testing::Test, public VectorTestBase {
// Serialize with different range size.
while (offset < numRows) {
auto size = std::min<vector_size_t>(rangeSize, numRows - offset);
row.serialize(offset, size, rawBuffer, offsets.data() + offset);
row.serialize(offset, size, offsets.data() + offset, rawBuffer);
offset += size;
rangeSize = checkedMultiply<vector_size_t>(rangeSize, 2);
}
Expand Down
2 changes: 1 addition & 1 deletion velox/serializers/CompactRowSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CompactRowVectorSerializer : public IterativeVectorSerializer {
offset += rowSize[index] + sizeof(TRowSize);
}
// Write row data for all rows in range.
row.serialize(range.begin, range.size, rawBuffer, offsets.data());
row.serialize(range.begin, range.size, offsets.data(), rawBuffer);
}
}
}
Expand Down

0 comments on commit 5f0bb06

Please sign in to comment.