Skip to content

Cypher: return zero for ungrouped count(*) over empty input #2742

Open

Description

@DeusData

Track the remaining empty-input aggregate behavior separately from the early-WHERE and alias-binding fixes merged in #2502 (3457b21).

For a valid ungrouped query whose MATCH/WHERE produces no input rows, RETURN count(*) AS total should return one result row with total = 0. This follow-up is limited to that aggregate behavior; it does not reopen the resolved alias-binding issue.

Acceptance criteria:

  • Add a deterministic regression covering an empty graph and a nonempty graph where WHERE filters out every row.
  • Return one row containing integer zero for ungrouped count(*), while preserving nonempty counts and grouped-aggregate behavior.
  • Verify the focused Cypher suite.

Thank you to @lorenzozanee for the regression coverage and alias-binding work that helped separate these cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcypherCypher query language parser/executor bugs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions