Skip to content

Commit f4d811f

Browse files
committed
refactor(frozen): use dense_value_index for MemorySchema
1 parent 757020a commit f4d811f

File tree

2 files changed

+4
-96
lines changed

2 files changed

+4
-96
lines changed

frozen/thrift/lib/cpp/DistinctTable.h

Lines changed: 0 additions & 93 deletions
This file was deleted.

frozen/thrift/lib/cpp2/frozen/schema/MemorySchema.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
#include <boost/container_hash/hash.hpp>
1818

19-
#include <thrift/lib/cpp/DistinctTable.h>
19+
#include <dwarfs/internal/flat_dense_value_index.h>
20+
2021
#include <thrift/lib/thrift/gen-cpp-lite/frozen_types.h>
2122

2223
#define THRIFT_DECLARE_HASH(T) \
@@ -203,12 +204,12 @@ class MemorySchema {
203204
// Add helper structures here to help minimize size of schema during
204205
// save() operations.
205206
public:
206-
explicit Helper(MemorySchema& schema) : layoutTable_(&schema.layouts) {}
207+
explicit Helper(MemorySchema& schema) : layoutTable_{schema.layouts} {}
207208

208209
int16_t add(MemoryLayout&& layout);
209210

210211
private:
211-
DistinctTable<MemoryLayout> layoutTable_;
212+
dwarfs::internal::flat_dense_value_index<MemoryLayout> layoutTable_;
212213
};
213214

214215
void initFromSchema(Schema&& schema);

0 commit comments

Comments
 (0)