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

Method seekToRowGroup

c++/src/Reader.cc:550–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548 }
549
550 void RowReaderImpl::seekToRowGroup(uint32_t rowGroupEntryId) {
551 // store positions for selected columns
552 std::list<std::list<uint64_t>> positions;
553 // store position providers for selected colimns
554 std::unordered_map<uint64_t, PositionProvider> positionProviders;
555
556 for (auto rowIndex = rowIndexes_.cbegin(); rowIndex != rowIndexes_.cend(); ++rowIndex) {
557 uint64_t colId = rowIndex->first;
558 const proto::RowIndexEntry& entry =
559 rowIndex->second.entry(static_cast<int32_t>(rowGroupEntryId));
560
561 // copy index positions for a specific column
562 positions.push_back({});
563 auto& position = positions.back();
564 for (int pos = 0; pos != entry.positions_size(); ++pos) {
565 position.push_back(entry.positions(pos));
566 }
567 positionProviders.insert(std::make_pair(colId, PositionProvider(position)));
568 }
569
570 reader_->seekToRowGroup(positionProviders);
571 }
572
573 const FileContents& RowReaderImpl::getFileContents() const {
574 return *contents_;

Callers

nothing calls this directly

Calls 3

entryMethod · 0.80
PositionProviderClass · 0.50
insertMethod · 0.45

Tested by

no test coverage detected