| 1009 | }; |
| 1010 | |
| 1011 | MapColumnReader::MapColumnReader(const Type& type, StripeStreams& stripe, |
| 1012 | bool useTightNumericVector, bool throwOnSchemaEvolutionOverflow) |
| 1013 | : ColumnReader(type, stripe) { |
| 1014 | // Determine if the key and/or value columns are selected |
| 1015 | const std::vector<bool> selectedColumns = stripe.getSelectedColumns(); |
| 1016 | RleVersion vers = convertRleVersion(stripe.getEncoding(columnId).kind()); |
| 1017 | std::unique_ptr<SeekableInputStream> stream = |
| 1018 | stripe.getStream(columnId, proto::Stream_Kind_LENGTH, true); |
| 1019 | if (stream == nullptr) throw ParseError("LENGTH stream not found in Map column"); |
| 1020 | rle_ = createRleDecoder(std::move(stream), false, vers, memoryPool, metrics); |
| 1021 | const Type& keyType = *type.getSubtype(0); |
| 1022 | if (selectedColumns[static_cast<uint64_t>(keyType.getColumnId())]) { |
| 1023 | keyReader_ = |
| 1024 | buildReader(keyType, stripe, useTightNumericVector, throwOnSchemaEvolutionOverflow); |
| 1025 | } |
| 1026 | const Type& elementType = *type.getSubtype(1); |
| 1027 | if (selectedColumns[static_cast<uint64_t>(elementType.getColumnId())]) { |
| 1028 | elementReader_ = |
| 1029 | buildReader(elementType, stripe, useTightNumericVector, throwOnSchemaEvolutionOverflow); |
| 1030 | } |
| 1031 | } |
| 1032 | |
| 1033 | MapColumnReader::~MapColumnReader() { |
| 1034 | // PASS |
nothing calls this directly
no test coverage detected