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

Function table_scan_sample_next_tuple

src/include/access/tableam.h:2309–2323  ·  view source on GitHub ↗

* Fetch the next sample tuple into `slot` and return true if a visible tuple * was found, false otherwise. table_scan_sample_next_block() needs to * previously have selected a block (i.e. returned true), and no previous * table_scan_sample_next_tuple() for the same block may have returned false. * * This will call the TsmRoutine's NextSampleTuple() callback. */

Source from the content-addressed store, hash-verified

2307 * This will call the TsmRoutine's NextSampleTuple() callback.
2308 */
2309static inline bool
2310table_scan_sample_next_tuple(TableScanDesc scan,
2311 struct SampleScanState *scanstate,
2312 TupleTableSlot *slot)
2313{
2314 /*
2315 * We don't expect direct calls to table_scan_sample_next_tuple with valid
2316 * CheckXidAlive for catalog or regular tables. See detailed comments in
2317 * xact.c where these variables are declared.
2318 */
2319 if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan))
2320 elog(ERROR, "unexpected table_scan_sample_next_tuple call during logical decoding");
2321 return scan->rs_rd->rd_tableam->scan_sample_next_tuple(scan, scanstate,
2322 slot);
2323}
2324
2325
2326/* ----------------------------------------------------------------------------

Callers 1

tablesample_getnextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected