FalkorDB / FalkorDB

A super fast Graph Database uses GraphBLAS under the hood for its sparse adjacency matrix graph representation. Our goal is to provide the best Knowledge Graph for LLM (GraphRAG).

Home Page:https://www.falkordb.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different results when counting * and c

gkorland opened this issue · comments

ref: RedisGraph/RedisGraph#3214

I execute two queries on my empty RedisGraph and get an error.

Redis version:7.2.0
RedisGraph version: v2.12.10
operating system: windows 11
API:Cypher version 9

To reproduce:

OPTIONAL MATCH (c)-[:PP]-() WHERE c IS NOT NULL RETURN count(*)
OPTIONAL MATCH (c)-[:PP]-() WHERE c IS NOT NULL RETURN count(c)

Actual behavior:
When counting by *,the result is 1 but when counting by c the result becomes 0.
I'm asking if this is an expected result or a bug?

this is the same result as in the latest neo4j 5.13.0
image
when counting the 'c' variables null values are not counted
when counting the '*' any record counted
even that you have the where that filter null values it is under the OPTIONAL MATCH so if there is no pattern that meets the filter c will be null for 1 record

Thanks for you explanation!