Skip to content

Commit

Permalink
feat: Table evolution fuzzer
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookincubator/velox#11872

Basic version of table evolution fuzzer.  Full design of the fuzzer can be found at https://docs.google.com/document/d/18jjNRknSxI99mgdL7eDMzkq65i-mi47Ukymi3JkXzUA/edit

Differential Revision: D67283632
  • Loading branch information
Yuhta authored and facebook-github-bot committed Dec 17, 2024
1 parent 68dd6ff commit 0738a51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dwio/nimble/velox/tests/VeloxReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ struct VeloxMapGeneratorConfig {
// If true, generated string field will have variable length, maxing at
// 'stringLength'.
bool stringVariableLength = true;

bool allowConstant = true;
};

// Generates a RowVector containing a set of feature MapVector with
Expand Down Expand Up @@ -140,6 +142,7 @@ class VeloxMapGenerator {
.stringVariableLength = config_.stringVariableLength,
.containerLength = 5,
.containerVariableLength = true,
.allowConstantVector = config_.allowConstant,
},
leafPool_,
config_.seed);
Expand Down Expand Up @@ -3499,7 +3502,7 @@ TEST_F(VeloxReaderTests, MapToFlatMapAndPassthrough) {
<< "Expected: " << type->toString()
<< ", actual: " << flatRootTypeFromSchema->toString();

// fullReadResult and nextExpected are interchangable at this point
// fullReadResult and nextExpected are interchangeable at this point
for (auto i = 0; i < fullReadResult.size(); ++i) {
velox::VectorPtr flatResult;
auto& current = fullReadResult.at(i);
Expand Down Expand Up @@ -5674,6 +5677,7 @@ TEST_F(VeloxReaderTests, EstimatedRowSizeComplex) {
// BaseVector::retainedSize()
.stringLength = velox::StringView::kInlineSize,
.stringVariableLength = false,
.allowConstant = false,
};
VeloxMapGenerator generator(leafPool_.get(), generatorConfig);
auto vector = generator.generateBatch(rowCount);
Expand Down

0 comments on commit 0738a51

Please sign in to comment.