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

Method StructColumnReader

c++/src/ColumnReader.cc:799–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797 };
798
799 StructColumnReader::StructColumnReader(const Type& type, StripeStreams& stripe,
800 bool useTightNumericVector,
801 bool throwOnSchemaEvolutionOverflow)
802 : ColumnReader(type, stripe) {
803 // count the number of selected sub-columns
804 const std::vector<bool> selectedColumns = stripe.getSelectedColumns();
805 switch (static_cast<int64_t>(stripe.getEncoding(columnId).kind())) {
806 case proto::ColumnEncoding_Kind_DIRECT:
807 for (unsigned int i = 0; i < type.getSubtypeCount(); ++i) {
808 const Type& child = *type.getSubtype(i);
809 if (selectedColumns[static_cast<uint64_t>(child.getColumnId())]) {
810 children_.push_back(
811 buildReader(child, stripe, useTightNumericVector, throwOnSchemaEvolutionOverflow));
812 }
813 }
814 break;
815 case proto::ColumnEncoding_Kind_DIRECT_V2:
816 case proto::ColumnEncoding_Kind_DICTIONARY:
817 case proto::ColumnEncoding_Kind_DICTIONARY_V2:
818 default:
819 throw ParseError("Unknown encoding for StructColumnReader");
820 }
821 }
822
823 uint64_t StructColumnReader::skip(uint64_t numValues) {
824 numValues = ColumnReader::skip(numValues);

Callers

nothing calls this directly

Calls 7

buildReaderFunction · 0.85
ParseErrorClass · 0.85
getSubtypeCountMethod · 0.80
getSubtypeMethod · 0.80
getColumnIdMethod · 0.65
getSelectedColumnsMethod · 0.45
getEncodingMethod · 0.45

Tested by

no test coverage detected