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

Function LookupOperWithArgs

src/backend/parser/parse_oper.c:144–168  ·  view source on GitHub ↗

* LookupOperWithArgs * Like LookupOperName, but the argument types are specified by * a ObjectWithArgs node. */

Source from the content-addressed store, hash-verified

142 * a ObjectWithArgs node.
143 */
144Oid
145LookupOperWithArgs(ObjectWithArgs *oper, bool noError)
146{
147 TypeName *oprleft,
148 *oprright;
149 Oid leftoid,
150 rightoid;
151
152 Assert(list_length(oper->objargs) == 2);
153 oprleft = linitial_node(TypeName, oper->objargs);
154 oprright = lsecond_node(TypeName, oper->objargs);
155
156 if (oprleft == NULL)
157 leftoid = InvalidOid;
158 else
159 leftoid = LookupTypeNameOid(NULL, oprleft, noError);
160
161 if (oprright == NULL)
162 rightoid = InvalidOid;
163 else
164 rightoid = LookupTypeNameOid(NULL, oprright, noError);
165
166 return LookupOperName(NULL, oper->objname, leftoid, rightoid,
167 noError, -1);
168}
169
170/*
171 * get_sort_group_operators - get default sorting/grouping operators for type

Callers 4

DefineOpClassFunction · 0.85
AlterOpFamilyAddFunction · 0.85
AlterOperatorFunction · 0.85
get_object_addressFunction · 0.85

Calls 3

list_lengthFunction · 0.85
LookupTypeNameOidFunction · 0.85
LookupOperNameFunction · 0.85

Tested by

no test coverage detected