MCPcopy Create free account
hub / github.com/apache/cloudberry / FetchTuple

Method FetchTuple

contrib/pax_storage/src/cpp/access/pax_scanner.cc:120–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118PaxIndexScanDesc::~PaxIndexScanDesc() {}
119
120bool PaxIndexScanDesc::FetchTuple(ItemPointer tid, Snapshot snapshot,
121 TupleTableSlot *slot, bool *call_again,
122 bool *all_dead) {
123 BlockNumber block = pax::GetBlockNumber(*tid);
124 if (block != current_block_ || !reader_) {
125 if (!OpenMicroPartition(block, snapshot)) return false;
126 }
127
128 Assert(current_block_ == block && reader_);
129 if (call_again) *call_again = false;
130 if (all_dead) *all_dead = false;
131
132 try {
133 ExecClearTuple(slot);
134 if (CheckExists(GetRelation(), tid, snapshot, all_dead) &&
135 reader_->GetTuple(slot, pax::GetTupleOffset(*tid))) {
136 SetBlockNumber(&slot->tts_tid, block);
137 ExecStoreVirtualTuple(slot);
138
139 return true;
140 }
141 } catch (cbdb::CException &e) {
142 e.AppendDetailMessage(
143 fmt("\n FetchTuple [tid=%s]", ItemPointerToString(tid)));
144 CBDB_RERAISE(e);
145 }
146
147 return false;
148}
149
150bool PaxIndexScanDesc::OpenMicroPartition(BlockNumber block,
151 Snapshot snapshot) {

Callers 2

BitmapNextTupleMethod · 0.80
IndexFetchTupleMethod · 0.80

Calls 10

GetBlockNumberFunction · 0.85
ExecClearTupleFunction · 0.85
CheckExistsFunction · 0.85
GetTupleOffsetFunction · 0.85
SetBlockNumberFunction · 0.85
ExecStoreVirtualTupleFunction · 0.85
ItemPointerToStringFunction · 0.85
AppendDetailMessageMethod · 0.80
fmtFunction · 0.50
GetTupleMethod · 0.45

Tested by

no test coverage detected