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

Function ValueHashJoinToString

src/execution_plan/ops/op_value_hash_join.c:203–228  ·  view source on GitHub ↗

string representation of operation

Source from the content-addressed store, hash-verified

201
202// string representation of operation
203static void ValueHashJoinToString
204(
205 const OpBase *ctx,
206 sds *buff
207) {
208 const OpValueHashJoin *op = (const OpValueHashJoin *)ctx;
209
210 char *exp_str = NULL;
211
212 *buff = sdscatprintf(*buff, "%s | ", op->op.name);
213
214 // return early if we don't have arithmetic expressions to print
215 // this can occur when an upstream op like MERGE has
216 // already freed this operation with PropagateFree
217 if(!(op->lhs_exp && op->rhs_exp)) return;
218
219 AR_EXP_ToString(op->lhs_exp, &exp_str);
220 *buff = sdscatprintf(*buff, "%s", exp_str);
221 rm_free(exp_str);
222
223 *buff = sdscatprintf(*buff, " = ");
224
225 AR_EXP_ToString(op->rhs_exp, &exp_str);
226 *buff = sdscatprintf(*buff, "%s", exp_str);
227 rm_free(exp_str);
228}
229
230// creates a new valueHashJoin operation
231OpBase *NewValueHashJoin

Callers

nothing calls this directly

Calls 3

sdscatprintfFunction · 0.85
AR_EXP_ToStringFunction · 0.85
rm_freeFunction · 0.85

Tested by

no test coverage detected