vladiksun opened a new issue, #993:
URL: https://github.com/apache/age/issues/993
ArrangoDB allows to optimize the graph traversal by applying a special
clause - PRUNE forcing the engine not to go deeper (stop conditions)
This approach drastically improves the speed of a FILTER sections.
For example:
```aql
FOR any_vertex, any_edge, path IN 1..100 OUTBOUND
'account/0878730b-316e-4afb-a45e-6eca52c95bac' edges
PRUNE any_edge.relation IN ['managed']
FILTER any_edge.relation NOT IN ['managed']
RETURN any_vertex
```
Can this be somehow simulated in Apache Age + Cypher ?
Following the documentation
[Exists(Path)](https://age.apache.org/age-manual/master/functions/predicate_functions.html)
I assumed something like this could be an alternative
```pgsql
select
properties
from ag_catalog.cypher('test_graph', $$
MATCH (from:`account` { id: 'cd94fd96-adeb-40a6-bc17-a2f9b51f6296'}
)-[any_edge:`edges`*1..100]->(to)
WITH from, to, last(any_edge) AS edge_out
WHERE exists( (from)-[ { relation: "managed" } ]-(to) )
AND NOT edge_out.relation IN ['managed']
RETURN properties(to)
$$
) as (properties ag_catalog.agtype );
```
But got an error \
[42P01] ERROR: missing FROM-clause entry for table "from"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]