Skip to content

Comments

GQL Support Part 2: GQL Statements#342

Open
apstndb wants to merge 3 commits intocloudspannerecosystem:mainfrom
apstndb:feature/gql-standard-operators
Open

GQL Support Part 2: GQL Statements#342
apstndb wants to merge 3 commits intocloudspannerecosystem:mainfrom
apstndb:feature/gql-standard-operators

Conversation

@apstndb
Copy link
Contributor

@apstndb apstndb commented Feb 21, 2026

This PR implements the second phase of GQL support, focusing on GQL statements and refinements to the RETURN statement.

Implemented GQL Statements / Features

  • GQL Statements
    • FILTER (including support for the optional WHERE keyword).
    • LET
    • FOR (including WITH OFFSET syntax).
    • ORDER BY (as a standalone statement, with ASCENDING/DESCENDING synonyms).
    • LIMIT (as a standalone statement).
    • OFFSET / SKIP (as a standalone statement).
    • WITH (supporting ALL/DISTINCT, *, AS alias, and GROUP BY with group hints).
  • RETURN Statement Enhancements
    • Added support for trailing clauses: GROUP BY (with group hints), ORDER BY, OFFSET/SKIP, and LIMIT.
    • Enforced strict clause ordering: GROUP BY -> ORDER BY -> OFFSET/SKIP -> LIMIT.
  • Syntax Rule Enforcement
    • Mandatory AS keyword for aliases in RETURN items.
    • Validation to ensure linear query segments end with a RETURN operator.

Unimplemented GQL Statements (Future Phases)

The following high-level features are planned for subsequent phases:

  • MATCH statement.
  • GQL Subqueries (EXISTS, ARRAY, VALUE, IN).
  • CALL statement.
  • GRAPH_TABLE operator (SQL integration).
  • Undocumented or internal features, implemented in GoogleSQL reference implementation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant