Repository navigation
Description
Summary
query_graph appears to mishandle computed expressions in WITH, especially split(...)[0]. Instead of returning the requested columns or an explicit unsupported-query error, it returns a default-looking projection with blank values.
Repro
MATCH (f:File)
WITH split(f.file_path,'/')[0] AS top, count(*) AS files
RETURN top, files
ORDER BY files DESCExpected behavior
Either:
- Valid grouped output with columns
top,files; or - An explicit error saying the expression/query is unsupported.
Actual behavior
The tool returned:
- Columns:
f.name,f.qualified_name,f.label - Total rows: one row per
Filenode, 449 in this case - Row values: blank strings, for example
["", "", ""]
This looks like a fallback/default file-node projection rather than the requested return shape.
Control queries that worked
MATCH (f:File) RETURN count(f) AS filesReturned 449.
MATCH (f:File) RETURN f.file_path AS path LIMIT 5Returned valid paths, for example cloudbuild.yaml, vitest.config.ts, and capacitor.config.ts.
Additional observations
This also returned blank values instead of an error:
MATCH (f:File)
RETURN split(f.file_path,'/')[0] AS top
LIMIT 5And an obviously unsupported function behaved similarly:
MATCH (f:File)
RETURN foo(f.file_path) AS nope
LIMIT 3Why this matters
Silent wrong output is worse than a query failure. Callers can mistake blank/default rows for valid graph evidence and make incorrect downstream claims.
Possible cause
One or more of these may be unsupported or mishandled:
split()- list indexing with
[0] - computed aliases in
WITH - aggregation over a computed expression
- fallback behavior when expression evaluation fails
If these expressions are intentionally unsupported, query_graph should fail closed with a clear error instead of returning blank/default projections.
Sample Output
{
"project": "home-gc-projcet-directory",
"query": "MATCH (f:File) WITH split(f.file_path,'/')[0] AS top, count(*) AS files RETURN top, files ORDER BY files DESC"
}
{"columns":["f.name","f.qualified_name","f.label"],"rows":[["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",
""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""],["","",""]],"total":449}
{
"project": "home-gc-project-directory",
"query": "MATCH (n) WHERE n.file_path STARTS WITH 'src/store/' RETURN labels(n)[0] AS label, count(n) AS count ORDER BY count DESC",
"max_rows": 20
}
{"columns":["labels"],"rows":[[""],[""],[""],[""],[""],[""],[""]],"total":7}
Activity
DeusData commentedon May 31, 2026
Confirmed reproducible: an unsupported
WITHexpression (WITH split(f.file_path,'/')[0] AS top, count(*) AS files) does not error — it silently falls back to a default node projection (f.name/f.qualified_name/f.label) with blank values, which is worse than failing. Fix scope: when a projection/WITH expression isn't supported, return an expliciterrorin the result instead of the silent default. This is the highest-priority of the Cypher set (silent-wrong-output). Reproduced + queued. 🙏fix(cypher): resync on unsupported WITH/RETURN expression (#373)
DeusData commentedon May 31, 2026
Fixed in commit a2cd1e7. The root problem was a parser desync:
split(f.file_path,'/')[0]parsedsplitas a bare variable and left(...)[0]unconsumed, which knocked the parser out of alignment and made it fall back to a default star projection — exactly thef.name/f.qualified_name/f.labelcolumns with blank values and one row per node you saw.parse_return_itemnow consumes the balanced parentheses/brackets of an unknown function-call/index expression, so the parser stays in sync. The result: your requested column shape is preserved (top,files— not the misleading star columns), sibling aggregates likecount(*)still compute, and the unsupportedsplit(...)[0]term simply projects empty rather than corrupting the whole projection.Note: this makes the output honest (correct columns, no misleading blank star projection) but does not yet evaluate
split()/list-indexing — so grouping bytopcollapses to a single blank group. Fullsplit()+ list-indexing support is a separate scalar-expression feature; if you need true per-directory grouping, open a focused enhancement and I'll implement thesplit/index evaluator. Verified by a regression test asserting the requested columns (not the star projection) are returned, withlabels()/toInteger()still working. Ships next release — thanks for the precise repro and the clear expected-behavior options!feat(cypher): string functions + fail loudly on unsupported syntax
fix(cypher): refuse a name that is not in scope instead of projecting…