New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Inconsistent result caused by reordering path patterns in the MATCH clause #3114
Comments
@HITFAY did you try to reproduce the issue on the latest version of 2.12? |
Yes, and the result is also different. I use Docker version: redis/redis-stack:6.2.6-v9
|
for
the result I get is
and for
the result
which are the same but different order |
I use the following code to load the data into DB, and then I query it in terminal. import redis
from redisgraph import Graph
class Redis:
def __init__(self, uri, database, reset=True):
self.redis_con = redis.Redis(host=uri, port=6381, socket_timeout=10)
self.graph = Graph(database, self.redis_con)
if reset:
self.clear()
def clear(self):
self.run("MATCH (n) DETACH DELETE n")
def get_plan(self, query):
"""Returns tuple of execution plans"""
query = query.replace(';', '')
plan = self.redis_con.execute_command("GRAPH.EXPLAIN", self.graph.name, query)
plan = [step.decode('utf-8') if isinstance(step, bytes) else step for step in plan]
return tuple(plan)
def run(self, query):
query = query.replace(';', '')
result = self.graph.query(query)
return result.result_set, result.run_time_ms
def batch_run(self, queries):
for i in queries:
i = i.replace(';', '')
self.run(i)
if __name__ == "__main__":
r = Redis("localhost", "validate", True)
with open("query_file/redis.log") as f:
cmd = f.readlines()
try:
r.batch_run(cmd)
except Exception as e:
print(e) And I only get a single result, I don't know what's wrong with it.
|
indeed in 2.10 it returns only 1 result in 2.12 it is returning the result I sent |
Can you tell me which docker version is 2.12, Please? I use redis/redis-stack:6.2.6-v9, but it seems is not the correct 2.12. I also tried redis/redis-stack:7.2.0-v2, but there is no graph.so supported. ps. I have problem in building my own Redis version in local, so I have to choose the docker. |
2.12 wasn't released in redis-stack you can find it in redislabs/redisgraph:2.12.9 |
Version: Docker image redis/redis-stack:6.2.6-v7
OS: Ubuntu 22.04
API/Driver: Cypher
Hello, the result changes when I change the last match pattern into another one. It is confusing that the same query clauses can get two different results.
To reproduce, I construct a graph that is able to reproduce the bug:
Please look at the following queries, the only difference between them is the Match clauses at the last.
The result shows that one result is
8
, another is1svfEV
I also find that there are some issues similar with what I described, #3093, #3091, #3081
Could you check it, please?
I have attached the graph creation statements below for you to reproduce. If you have any further question, please feel free to contact me, I will replay as soon as possible.
Hope to get reply soon.
reproduce.txt
The text was updated successfully, but these errors were encountered: