Skip to content

Commit

Permalink
Fix memory arbitration fuzzer failure (facebookincubator#11493)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookincubator#11493

Memory arbitration fuzzer failed because of presto vector serde is not registered
because of the recent row-wise shuffle support. This PR fixes this by registering
all the named vector serde for memory arbitration fuzzer.

Reviewed By: tanjialiang

Differential Revision: D65739114

fbshipit-source-id: 422becf67a1d14e35453ed195fd0ae4b74b388d4
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Nov 11, 2024
1 parent 57040fd commit c8c4707
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions velox/exec/fuzzer/MemoryArbitrationFuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include "velox/exec/tests/utils/TempDirectoryPath.h"
#include "velox/functions/lib/aggregates/AverageAggregateBase.h"
#include "velox/functions/sparksql/aggregates/Register.h"
#include "velox/serializers/CompactRowSerializer.h"
#include "velox/serializers/PrestoSerializer.h"
#include "velox/serializers/UnsafeRowSerializer.h"
#include "velox/vector/fuzzer/VectorFuzzer.h"

DECLARE_int64(arbitrator_capacity);
Expand Down Expand Up @@ -221,6 +224,15 @@ class MemoryArbitrationFuzzer {

MemoryArbitrationFuzzer::MemoryArbitrationFuzzer(size_t initialSeed)
: vectorFuzzer_{getFuzzerOptions(), pool_.get()} {
if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kPresto)) {
serializer::presto::PrestoVectorSerde::registerNamedVectorSerde();
}
if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kCompactRow)) {
serializer::CompactRowVectorSerde::registerNamedVectorSerde();
}
if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kUnsafeRow)) {
serializer::spark::UnsafeRowVectorSerde::registerNamedVectorSerde();
}
// Make sure not to run out of open file descriptors.
std::unordered_map<std::string, std::string> hiveConfig = {
{connector::hive::HiveConfig::kNumCacheFileHandles, "1000"}};
Expand Down

0 comments on commit c8c4707

Please sign in to comment.