bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.33k stars 148 forks source link

ERROR: could not find hash function for hash operator 7136 #537

Closed joefagan closed 3 years ago

joefagan commented 3 years ago

I wish to match the following pattern in a graph

image

This is the code to create such a pattern

create graph t1;
set graph_path = t1;
create (u {n: 1}),(v {n: 2}),(w {n: 3}),(x {n: 4})
create (u)-[:r]->(w)
create (u)-[:r]->(x)
create (v)-[:r]->(w)
create (v)-[:r]->(x);

This is where I try to match the pattern

match p = (u)-[]->()<-[]-()-[]->()<-[]-(v) where u = v return p;

ERROR: could not find hash function for hash operator 7136

I cannot find a way to match the pattern that does not produce the error.

Is there a better way to match this pattern?

psql# show agversion;

agversion

2.1.2 (1 row)

emotionbug commented 3 years ago

This issue fixed on v2.1.3 ( https://github.com/bitnine-oss/agensgraph/commit/2870e2ba5d9654536b310f340059ed379cea17da ).

and, it can be wrap with id function. match p = (u)-[]->()<-[]-()-[]->()<-[]-(v) where id(u) = id(v) return p;