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

Function table_beginscan_sampling

src/include/access/tableam.h:1147–1163  ·  view source on GitHub ↗

* table_beginscan_sampling is an alternative entry point for setting up a * TableScanDesc for a TABLESAMPLE scan. As with bitmap scans, it's worth * using the same data structure although the behavior is rather different. * In addition to the options offered by table_beginscan_strat, this call * also allows control of whether page-mode visibility checking is used. */

Source from the content-addressed store, hash-verified

1145 * also allows control of whether page-mode visibility checking is used.
1146 */
1147static inline TableScanDesc
1148table_beginscan_sampling(Relation rel, Snapshot snapshot,
1149 int nkeys, struct ScanKeyData *key,
1150 bool allow_strat, bool allow_sync,
1151 bool allow_pagemode)
1152{
1153 uint32 flags = SO_TYPE_SAMPLESCAN;
1154
1155 if (allow_strat)
1156 flags |= SO_ALLOW_STRAT;
1157 if (allow_sync)
1158 flags |= SO_ALLOW_SYNC;
1159 if (allow_pagemode)
1160 flags |= SO_ALLOW_PAGEMODE;
1161
1162 return rel->rd_tableam->scan_begin(rel, snapshot, nkeys, key, NULL, flags);
1163}
1164
1165/*
1166 * table_beginscan_tid is an alternative entry point for setting up a

Callers 1

tablesample_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected