Skip to content

G2: graph types, labels, edge properties, catalog #117

Description

@tamnd

Milestone G2 of the GQL program (Spec/2064g/gql/plan/00-overview.md). Spec: plan/03.

This is the milestone that turns the run's 16 errors into judged answers. Today a node carries one name and a relationship carries none, because RelTable is { id, name, from, to, edge_count } with nowhere to put a property. Every real benchmark needs edge properties, LDBC SNB needs them on every edge it loads, and the label set model that patterns and the planner both depend on does not exist. Edge properties are the largest storage change in the program and everything downstream assumes them, which is why this lands before patterns and before writes.

labels (plan/03 §2):

  • label sets as bitsets over a per graph dictionary, with a declared 64 label fast path
  • label expressions compiled to bitset predicates
  • the planner prunes label predicates statically when the graph type makes them constant

edge properties (plan/03 §4):

  • property directory on RelTable, positional with the CSR
  • edge properties cross the sqlite staging hop in both directions, addressed by the edge ordinal the load order gives every edge
  • reorder permutes edge properties with the CSR permutation
  • on disk format version bump and a recovery matrix entry

graph types (plan/03 §3):

  • closed graph types, written out as the element type patterns ISO writes, and LIKE a graph
  • open graph types and a graph created with its type inline or LIKE a graph
  • a graph created from a source graph that holds tables, which is the block for block AS COPY OF
  • element types with key label sets, inference, optional keys
  • the three relaxed consistency features, which key the property directory by element type

catalog (plan/03 §5):

  • CREATE and DROP for a graph type, with IF EXISTS, IF NOT EXISTS and OR REPLACE
  • CREATE and DROP for schema and graph, with the same modifiers
  • DROP GRAPH actually reclaims the space, with a case that asserts it

GH (plan/03 §6):

  • GH01 external references, which the grammar leaves at "!! See the Syntax Rules.", so gql-compat records it in corpus/unwritable.yaml as a feature no portable case can reach rather than testing it
  • GH02 undirected edge patterns

done when:

  • GG 12 of 12 and GH 1 of 1 that a portable case can reach, supported in the gql-compat report
  • GC 5 of 5 supported, every case of GC01 to GC05 passing, the fifth having wanted a catalog statement and a data statement in one CALL block and getting it in Let a catalog statement open the body of a call the statement begins with #527
  • closed graph type static property resolution is demonstrated to remove the per row string compare property lookup, with the before and after number
  • the edge property write path is crash harness green
  • a graph-bench workload that needs edge properties loads and runs
  • bench/budgets.toml green, no regression anywhere in the comparative matrix that this machine can resolve, with the strict regression check left for a controlled machine

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

    catalogCatalog, graph types, schemasformatOn-disk format stabilitygqlISO/IEC 39075 GQL conformancemilestoneMilestone tracking issuequeryParser, planner, executorstorageStorage engines and file formats

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions