Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backend/access/aocs/aocsam_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ aoco_getnextslot(TableScanDesc scan, ScanDirection direction, TupleTableSlot *sl
return false;
}

static int
static uint32
aoco_scan_flags(Relation rel)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/appendonly/appendonlyam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ appendonly_getnextslot(TableScanDesc scan, ScanDirection direction, TupleTableSl
return false;
}

int
uint32
appendonly_scan_flags(Relation relation)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/heap/heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ heap_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction,
return true;
}

int
uint32
heap_scan_flags(Relation relation)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/include/access/heapam.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extern void heap_set_tidrange(TableScanDesc sscan, ItemPointer mintid,
extern bool heap_getnextslot_tidrange(TableScanDesc sscan,
ScanDirection direction,
TupleTableSlot *slot);
extern int heap_scan_flags(Relation relation);
extern uint32 heap_scan_flags(Relation relation);
extern bool heap_fetch(Relation relation, Snapshot snapshot,
HeapTuple tuple, Buffer *userbuf);
extern bool heap_fetch_extended(Relation relation, Snapshot snapshot,
Expand Down
12 changes: 11 additions & 1 deletion src/include/access/tableam.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ typedef struct TableAmRoutine
* AM can support, return the flags represented the supported features of
* scan.
*/
int (*scan_flags) (Relation rel);
uint32 (*scan_flags) (Relation rel);

/* ------------------------------------------------------------------------
* Parallel table scan related functions.
Expand Down Expand Up @@ -1245,6 +1245,16 @@ table_scan_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction,
slot);
}

/*
* Return the flags represented the supported features of table AM scan.
*/
static inline uint32
table_scan_flags(Relation rel)
{
if (rel->rd_tableam->scan_flags)
return rel->rd_tableam->scan_flags(rel);
return 0;
}

/* ----------------------------------------------------------------------------
* Parallel table scan related functions.
Expand Down
2 changes: 1 addition & 1 deletion src/include/cdb/cdbappendonlyam.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ extern void appendonly_endscan(TableScanDesc scan);
extern bool appendonly_getnextslot(TableScanDesc scan,
ScanDirection direction,
TupleTableSlot *slot);
extern int appendonly_scan_flags(Relation relation);
extern uint32 appendonly_scan_flags(Relation relation);
extern AppendOnlyFetchDesc appendonly_fetch_init(
Relation relation,
Snapshot snapshot,
Expand Down