MCPcopy Create free account
hub / github.com/apache/orc / MapColumnReader

Method MapColumnReader

c++/src/ColumnReader.cc:1011–1031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 9

convertRleVersionFunction · 0.85
ParseErrorClass · 0.85
createRleDecoderFunction · 0.85
buildReaderFunction · 0.85
getSubtypeMethod · 0.80
getColumnIdMethod · 0.65
getSelectedColumnsMethod · 0.45
getEncodingMethod · 0.45
getStreamMethod · 0.45

Tested by

no test coverage detected