POST /cypher rejects a query that ORDER BYs a RETURN alias:
MATCH ()-[r:RELATION]->() RETURN r.relation_type AS rt, count(*) AS n ORDER BY n DESC
→ fails with could not find rte for n (the daemon's RETURN-alias parser doesn't resolve the aggregate alias n in ORDER BY).
WORKAROUND (in use): omit ORDER BY, sort client-side — works fine (SME Cat 4 exact-aggregation path does this, multipass#211).
Impact: low (client-side sort is trivial), but the verbatim cypher people copy from docs/AGE examples won't run. Fix = resolve RETURN aliases in the ORDER BY rewrite. Surfaced during the Cat 4 real-KG measurement work (the GROUP BY aggregation itself is fine + doesn't OOM; only the ORDER BY alias trips).
POST /cypher rejects a query that ORDER BYs a RETURN alias:
→ fails with
could not find rte for n(the daemon's RETURN-alias parser doesn't resolve the aggregate aliasnin ORDER BY).WORKAROUND (in use): omit ORDER BY, sort client-side — works fine (SME Cat 4 exact-aggregation path does this, multipass#211).
Impact: low (client-side sort is trivial), but the verbatim cypher people copy from docs/AGE examples won't run. Fix = resolve RETURN aliases in the ORDER BY rewrite. Surfaced during the Cat 4 real-KG measurement work (the GROUP BY aggregation itself is fine + doesn't OOM; only the ORDER BY alias trips).