You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ All it takes to get a RUM access method working is to implement a few user-defin
24
24
```
25
25
int rum_compare(Datum a, Datum b)
26
26
```
27
+
Compares two keys (not indexed items!) and returns an integer less than zero, zero, or greater than zero, indicating whether the first key is less than, equal to, or greater than the second. Null keys are never passed to this function.
28
+
29
+
Alternatively, if the operator class does not provide a compare method, RUM will look up the default btree operator class for the index key data type, and use its comparison function. It is recommended to specify the comparison function in a RUM operator class that is meant for just one data type, as looking up the btree operator class costs a few cycles. However, polymorphic RUM operator classes (such as array_ops) typically cannot specify a single comparison function.
27
30
28
31
###Function 2 rum_extract_value
29
32
```
@@ -59,9 +62,6 @@ On success, `*recheck` should be set to true if the heap tuple needs to be reche
59
62
```
60
63
int32 rum_compare_prefix(Datum a, Datum b,StrategyNumber n,void *addInfo)
61
64
```
62
-
Compares two keys (not indexed items!) and returns an integer less than zero, zero, or greater than zero, indicating whether the first key is less than, equal to, or greater than the second. Null keys are never passed to this function.
63
-
64
-
Alternatively, if the operator class does not provide a compare method, RUM will look up the default btree operator class for the index key data type, and use its comparison function. It is recommended to specify the comparison function in a RUM operator class that is meant for just one data type, as looking up the btree operator class costs a few cycles. However, polymorphic RUM operator classes (such as array_ops) typically cannot specify a single comparison function.
?bool *recheck,?Datum queryKeys[],?boolnullFlags[], Datum **addInfo, bool **nullFlagsAddInfo)
117
+
double rum_ordering_distance(bool check[], StrategyNumber n, Datum query, int32 nkeys, Pointer extra_data[],
118
+
bool *recheck, Datum queryKeys[], boolqueryCategories[], Datum **addInfo, bool **nullFlagsAddInfo)
119
119
double rum_ordering_distance(Datum curKey, Datum query, StrategyNumber n)
120
120
```
121
-
Operator class defines rum_ordering_distance function, if it can provide distance based on index data. If distance calculations can be done using key and query value, 3 parameters function should be defined. If distance calculation can be done using addInfo data (f.e, if addInfosores value of array size needed for distance calculation), 10 parameters function should be defined.
121
+
Operator class defines rum_ordering_distance function, if it can provide distance based on index data. If distance calculations can be done using key and query value, 3 parameters function should be defined. If distance calculation can be done using addInfo data (f.e, if addInfostores value of array size needed for distance calculation), 10 parameters function should be defined.
122
122
123
123
124
124
### Function 9 rum_outer_distance (used names: RUM_OUTER_ORDERING_PROC outerOrderingFn)