You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cypher parser currently doesn't support string comparison operators like CONTAINS, STARTS WITH, and ENDS WITH. These are commonly used Cypher operators for filtering nodes/relationships by partial string matching.
Current Behavior
Queries using string operators fail with a parsing error:
MATCH (s:Symbol) WHEREs.nameCONTAINS'Auth'RETURNs.nameLIMIT5
Error:
Cypher query error: Failed to parse Cypher query: Cypher parse error at position 0:
Failed to parse Cypher query: Parsing Error: Error { input: "WHERE s.name CONTAINS 'Auth' RETURN s.name LIMIT 5", code: Tag }
Expected Behavior
String comparison operators should be parsed and translated to SQL equivalents:
Cypher
SQL Equivalent
CONTAINS 'foo'
LIKE '%foo%'
STARTS WITH 'foo'
LIKE 'foo%'
ENDS WITH 'foo'
LIKE '%foo'
Technical Context
Looking at src/parser.rs, the comparison_operator function (lines 356-366) only handles:
=, <>, !=
<, >, <=, >=
And comparison_expression handles:
IN [...]
IS NULL, IS NOT NULL
String operators would need to be added as additional branches, likely with a new StringOperator enum or extending ComparisonOperator.
Use Case
We're using lance-graph for a code analysis tool where users query a knowledge graph of code symbols. Partial name matching is essential:
Activity
youssef-tharwat commentedon Dec 29, 2025
I just noticed that this got recently implemented.