── Planner: seed a single-hop pattern from its selective end ────────────── * * The executor scans pattern node 0 and expands from there. Written as * `MATCH (a)-[:CALLS]->(b) WHERE b.name = '_printk'`, that scans every node * in the store before the filter on `b` can discard any — on an 8.5 M node * kernel graph the query hit the execution-time limit while the anchored * spelling `MATCH (b:
| 5871 | * one single-relationship pattern with an explicit RETURN, and never to an |
| 5872 | * OPTIONAL MATCH, whose anchor is part of its meaning. */ |
| 5873 | static int cypher_cond_selectivity(const cbm_condition_t *c, const char *var) { |
| 5874 | if (!c || !c->variable || !var || strcmp(c->variable, var) != 0 || c->negated) { |
| 5875 | return 0; |
| 5876 | } |
| 5877 | if (!c->op || strcmp(c->op, "=") != 0 || !c->property) { |
| 5878 | return 0; |
| 5879 | } |
| 5880 | return (strcmp(c->property, "name") == 0 || strcmp(c->property, "qualified_name") == 0) ? 3 : 2; |
| 5881 | } |
| 5882 | |
| 5883 | /* Best equality on `var` reachable through AND alone. An AND chain is linked |
| 5884 | * along the right child (expr_chain_link), so the links are walked in a loop |
no outgoing calls
no test coverage detected