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

Function table_scan_sample_next_block

src/include/access/tableam.h:2287–2299  ·  view source on GitHub ↗

* Prepare to fetch tuples from the next block in a sample scan. Returns false * if the sample scan is finished, true otherwise. `scan` needs to have been * started via table_beginscan_sampling(). * * This will call the TsmRoutine's NextSampleBlock() callback if necessary * (i.e. NextSampleBlock is not NULL), or perform a sequential scan over the * underlying relation. */

Source from the content-addressed store, hash-verified

2285 * underlying relation.
2286 */
2287static inline bool
2288table_scan_sample_next_block(TableScanDesc scan,
2289 struct SampleScanState *scanstate)
2290{
2291 /*
2292 * We don't expect direct calls to table_scan_sample_next_block with valid
2293 * CheckXidAlive for catalog or regular tables. See detailed comments in
2294 * xact.c where these variables are declared.
2295 */
2296 if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan))
2297 elog(ERROR, "unexpected table_scan_sample_next_block call during logical decoding");
2298 return scan->rs_rd->rd_tableam->scan_sample_next_block(scan, scanstate);
2299}
2300
2301/*
2302 * Fetch the next sample tuple into `slot` and return true if a visible tuple

Callers 1

tablesample_getnextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected