| 118 | PaxIndexScanDesc::~PaxIndexScanDesc() {} |
| 119 | |
| 120 | bool 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 | |
| 150 | bool PaxIndexScanDesc::OpenMicroPartition(BlockNumber block, |
| 151 | Snapshot snapshot) { |
no test coverage detected