should skip invisible tuple, and fetch next tuple like appendonly_scan_bitmap_next_tuple
| 191 | // should skip invisible tuple, and fetch next tuple like |
| 192 | // appendonly_scan_bitmap_next_tuple |
| 193 | bool PaxScanDesc::BitmapNextTuple(struct TBMIterateResult *tbmres, |
| 194 | TupleTableSlot *slot) { |
| 195 | ItemPointerData tid; |
| 196 | if (tbmres->ntuples < 0) { |
| 197 | // lossy bitmap. The maximum value of the last 16 bits in CTID is |
| 198 | // 0x7FFF + 1, i.e. 0x8000. See layout of ItemPointerData in PAX |
| 199 | if (cindex_ > 0X8000) elog(ERROR, "unexpected offset in pax"); |
| 200 | |
| 201 | ItemPointerSet(&tid, tbmres->blockno, cindex_); |
| 202 | } |
| 203 | while (cindex_ < tbmres->ntuples) { |
| 204 | // The maximum value of the last 16 bits in CTID is 0x7FFF + 1, |
| 205 | // i.e. 0x8000. See layout of ItemPointerData in PAX |
| 206 | if (tbmres->offsets[cindex_] > 0X8000) |
| 207 | elog(ERROR, "unexpected offset in pax"); |
| 208 | ItemPointerSet(&tid, tbmres->blockno, tbmres->offsets[cindex_]); |
| 209 | |
| 210 | ++cindex_; |
| 211 | // invisible tuple should be skipped and fetch next tuple |
| 212 | if (index_desc_->FetchTuple(&tid, rs_base_.rs_snapshot, slot, nullptr, |
| 213 | nullptr)) { |
| 214 | return true; |
| 215 | } |
| 216 | } |
| 217 | return false; |
| 218 | } |
| 219 | |
| 220 | TableScanDesc PaxScanDesc::BeginScan(Relation relation, Snapshot snapshot, |
| 221 | int nkeys, struct ScanKeyData *key, |
no test coverage detected