Skip to content

query_graph silently returns blank default projection for unsupported WITH expression #373

@zer09

Description

@zer09

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 DESC

Expected 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 File node, 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 files

Returned 449.

MATCH (f:File) RETURN f.file_path AS path LIMIT 5

Returned 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 5

And an obviously unsupported function behaved similarly:

MATCH (f:File)
RETURN foo(f.file_path) AS nope
LIMIT 3

Why 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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions