| 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); |
nothing calls this directly
no test coverage detected