为src/common/backend/parser下的文件添加了部分注释 #29

Open
XL_up wants to merge 26 commits from XL_up/openGauss-server:master into master
1 changed files with 13 additions and 4 deletions
Showing only changes of commit 519962b095 - Show all commits

View File

@ -135,6 +135,7 @@ Oid LookupOperNameTypeNames(
{
Oid leftoid, rightoid;
/* fetch type's OID by given TypeNames */
if (oprleft == NULL)
leftoid = InvalidOid;
else
@ -174,9 +175,9 @@ void get_sort_group_operators(
{
TypeCacheEntry* typentry = NULL;
int cache_flags;
Oid lt_opr; // Oid of '<'
Oid eq_opr; // Oid of '='
Oid gt_opr; // Oid of '>'
Oid lt_opr; // '<'
Oid eq_opr; // '='
Oid gt_opr; // '>'
bool hashable = false;
/*
@ -218,7 +219,11 @@ void get_sort_group_operators(
*isHashable = hashable;
}
/* given operator tuple, return the operator OID */
/*
* given operator tuple, return the operator OID.
*
* This is a wrapper of HeapTupleGetOid().
*/
Oid oprid(Operator op)
{
return HeapTupleGetOid(op);
@ -508,9 +513,13 @@ Oid compatible_oper_opid(List* op, Oid arg1, Oid arg2, bool noError)
Operator optup;
Oid result;
/* given binary opname and OIDs of its args, find the operator tuple. */
optup = compatible_oper(NULL, op, arg1, arg2, noError, -1);
if (optup != NULL) {
/* given operator tuple, return the operator OID. */
result = oprid(optup);
/* release the unit of optup in SysCache. */
ReleaseSysCache(optup);
return result;
}