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

Function ScanKeyEntryInitialize

src/backend/access/common/scankey.c:31–56  ·  view source on GitHub ↗

* ScanKeyEntryInitialize * Initializes a scan key entry given all the field values. * The target procedure is specified by OID (but can be invalid * if SK_SEARCHNULL or SK_SEARCHNOTNULL is set). * * Note: CurrentMemoryContext at call should be as long-lived as the ScanKey * itself, because that's what will be used for any subsidiary info attached * to the ScanKey's FmgrInfo record. */

Source from the content-addressed store, hash-verified

29 * to the ScanKey's FmgrInfo record.
30 */
31void
32ScanKeyEntryInitialize(ScanKey entry,
33 int flags,
34 AttrNumber attributeNumber,
35 StrategyNumber strategy,
36 Oid subtype,
37 Oid collation,
38 RegProcedure procedure,
39 Datum argument)
40{
41 entry->sk_flags = flags;
42 entry->sk_attno = attributeNumber;
43 entry->sk_strategy = strategy;
44 entry->sk_subtype = subtype;
45 entry->sk_collation = collation;
46 entry->sk_argument = argument;
47 if (RegProcedureIsValid(procedure))
48 {
49 fmgr_info(procedure, &entry->sk_func);
50 }
51 else
52 {
53 Assert(flags & (SK_SEARCHNULL | SK_SEARCHNOTNULL));
54 MemSet(&entry->sk_func, 0, sizeof(entry->sk_func));
55 }
56}
57
58/*
59 * ScanKeyInit

Callers 8

init_scankeysFunction · 0.85
_bitmap_doinsertFunction · 0.85
_bitmap_init_buildstateFunction · 0.85
_bitmap_findbitmapsFunction · 0.85
_bt_firstFunction · 0.85
ExecIndexBuildScanKeysFunction · 0.85

Calls 1

fmgr_infoFunction · 0.85

Tested by

no test coverage detected