Summary
Running a query that uses a WITH clause causes a parse error, even though the docs say it’s supported.
Example
import pyarrow as pa
from lance_graph import GraphConfig, CypherQuery
people = pa.table({"id": [1, 2]})
follows = pa.table({"src": [1], "dst": [2]})
cfg = (
GraphConfig.builder()
.with_node_label("Person", "id")
.with_relationship("FOLLOWS", "src", "dst")
.build()
)
datasets = {"Person": people, "FOLLOWS": follows}
query = """
MATCH (a:Person)-[:FOLLOWS]->(b:Person)
WITH b, count(a.id) AS n
RETURN b.id, n
"""
CypherQuery(query).with_config(cfg).execute(datasets)
Expected
Query executes, returning counts per b.
Actual
ValueError: Cypher parse error ... input: WITH b, count(...)
Proposal
Rewriting without WITH works, but loses some expressiveness. But WITH does help a lot of Cypher beginners write queries as they're learning, so it's a useful add.
Environment
The following environment was used to test this:
lance-graph 0.4.0
Python 3.13
macOS Tahoe 26.2
Summary
Running a query that uses a
WITHclause causes a parse error, even though the docs say it’s supported.Example
Expected
Query executes, returning counts per b.
Actual
ValueError: Cypher parse error ... input: WITH b, count(...)Proposal
Rewriting without WITH works, but loses some expressiveness. But
WITHdoes help a lot of Cypher beginners write queries as they're learning, so it's a useful add.Environment
The following environment was used to test this: