diff --git a/velox/exec/tests/MultiFragmentTest.cpp b/velox/exec/tests/MultiFragmentTest.cpp index 5a328cbf0e0b0..3764f13251b54 100644 --- a/velox/exec/tests/MultiFragmentTest.cpp +++ b/velox/exec/tests/MultiFragmentTest.cpp @@ -2304,12 +2304,12 @@ TEST_P(MultiFragmentTest, mergeSmallBatchesInExchange) { test(100'000, 1); } else if (GetParam() == VectorSerde::Kind::kCompactRow) { test(1, 1'000); - test(1'000, 28); - test(10'000, 3); + test(1'000, 38); + test(10'000, 4); test(100'000, 1); } else { test(1, 1'000); - test(1'000, 63); + test(1'000, 72); test(10'000, 7); test(100'000, 1); } diff --git a/velox/serializers/CompactRowSerializer.cpp b/velox/serializers/CompactRowSerializer.cpp index e1f5bdfa4ffb3..b2471e09fbeae 100644 --- a/velox/serializers/CompactRowSerializer.cpp +++ b/velox/serializers/CompactRowSerializer.cpp @@ -224,6 +224,20 @@ class CompactRowVectorSerializer : public IterativeVectorSerializer { buffers_.clear(); } + std::unordered_map runtimeStats() override { + std::unordered_map map; + map.insert( + {{"compressedBytes", + RuntimeCounter(stats_.compressedBytes, RuntimeCounter::Unit::kBytes)}, + {"compressionInputBytes", + RuntimeCounter( + stats_.compressionInputBytes, RuntimeCounter::Unit::kBytes)}, + {"compressionSkippedBytes", + RuntimeCounter( + stats_.compressionSkippedBytes, RuntimeCounter::Unit::kBytes)}}); + return map; + } + void clear() override {} private: diff --git a/velox/serializers/UnsafeRowSerializer.cpp b/velox/serializers/UnsafeRowSerializer.cpp index b21baf0a30e21..4c46a16c39f3b 100644 --- a/velox/serializers/UnsafeRowSerializer.cpp +++ b/velox/serializers/UnsafeRowSerializer.cpp @@ -203,6 +203,20 @@ class UnsafeRowVectorSerializer : public IterativeVectorSerializer { buffers_.clear(); } + std::unordered_map runtimeStats() override { + std::unordered_map map; + map.insert( + {{"compressedBytes", + RuntimeCounter(stats_.compressedBytes, RuntimeCounter::Unit::kBytes)}, + {"compressionInputBytes", + RuntimeCounter( + stats_.compressionInputBytes, RuntimeCounter::Unit::kBytes)}, + {"compressionSkippedBytes", + RuntimeCounter( + stats_.compressionSkippedBytes, RuntimeCounter::Unit::kBytes)}}); + return map; + } + void clear() override {} private: