| 2305 | }; |
| 2306 | |
| 2307 | MapColumnWriter::MapColumnWriter(const Type& type, const StreamsFactory& factory, |
| 2308 | const WriterOptions& options) |
| 2309 | : ColumnWriter(type, factory, options), rleVersion_(options.getRleVersion()) { |
| 2310 | std::unique_ptr<BufferedOutputStream> lengthStream = |
| 2311 | factory.createStream(proto::Stream_Kind_LENGTH); |
| 2312 | lengthEncoder_ = createRleEncoder(std::move(lengthStream), false, rleVersion_, memPool, |
| 2313 | options.getAlignedBitpacking()); |
| 2314 | |
| 2315 | if (type.getSubtypeCount() > 0) { |
| 2316 | keyWriter_ = buildWriter(*type.getSubtype(0), factory, options); |
| 2317 | } |
| 2318 | |
| 2319 | if (type.getSubtypeCount() > 1) { |
| 2320 | elemWriter_ = buildWriter(*type.getSubtype(1), factory, options); |
| 2321 | } |
| 2322 | |
| 2323 | if (enableIndex) { |
| 2324 | recordPosition(); |
| 2325 | } |
| 2326 | } |
| 2327 | |
| 2328 | MapColumnWriter::~MapColumnWriter() { |
| 2329 | // PASS |
nothing calls this directly
no test coverage detected