MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / AR_EXP_NewOpNode

Function AR_EXP_NewOpNode

src/arithmetic/arithmetic_expression.c:185–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185AR_ExpNode *AR_EXP_NewOpNode
186(
187 const char *func_name,
188 bool include_internal,
189 uint child_count
190) {
191 // retrieve function
192 AR_FuncDesc *func = AR_GetFunc(func_name, include_internal);
193 AR_ExpNode *node = _AR_EXP_NewOpNode(child_count);
194
195 if(!func->internal) _AR_EXP_ValidateArgsCount(func, child_count);
196
197 ASSERT(func != NULL);
198 node->op.f = func;
199
200 // add aggregation context as function private data
201 if(func->aggregate) {
202 // generate aggregation context and store it in node's private data
203 ASSERT(func->callbacks.private_data != NULL);
204 node->op.private_data = func->callbacks.private_data();
205 }
206
207 return node;
208}
209
210static inline AR_ExpNode *_AR_EXP_InitializeOperand(AR_OperandNodeType type) {
211 AR_ExpNode *node = rm_calloc(1, sizeof(AR_ExpNode));

Callers 15

_NegateExpressionFunction · 0.85
_convertPatternPathFunction · 0.85
_AR_EXP_CloneOpFunction · 0.85
AR_EXP_NewOpNodeFromASTFunction · 0.85
_AR_ExpFromMapExpressionFunction · 0.85
_AR_ExpFromMapProjectionFunction · 0.85

Calls 3

AR_GetFuncFunction · 0.85
_AR_EXP_NewOpNodeFunction · 0.85

Tested by

no test coverage detected