Skip to content

Evaluate icebug-format as the persisted CSR layout #77

Closed

Description

@prrao87

Idea

icebug-format stores a graph as flat Parquet files of offsets (indptr) and neighbours (indices), designed so a graph database can mount it directly. It's discussed in lance-format/lance-graph#159. If the persisted CSR file in #72 followed it, LadybugDB might be able to read lance-csr's CSR, and the other way round.

Open question

Check whether icebug-format assumes dense node IDs. lance-csr's CSR stores raw node keys so that node-table writes never invalidate it; a layout that requires dense IDs would conflict with that.

Activity

  1. prrao87 commented on Oct 30, 2026

    @prrao87
    MemberAuthor

    Decision: don't adopt icebug-format as the CSR cache layout

    The open question has an answer: icebug-format assumes dense node ids. At be7ca65, the first column of each node table is the primary key, nodes are sorted by it and mapped to dense 0-based CSR indices, and indices stores those indices (cli.py).

    lance-csr's CSR stores raw target keys instead, so a node-table write never invalidates the adjacency: only the node index is rebuilt. An icebug file's targets are positions in one particular sorted node table, so any node insert or delete would shift them and force a full CSR rebuild. That breaks the property #72's cache relies on.

    icebug-format lance-csr CSR
    Neighbour values Dense positions in the sorted node table Raw target keys (i64, sparse or negative allowed)
    Node-table write Invalidates the adjacency Rebuilds the node index only
    Edge identity Edge property columns beside indices A Lance row address per slot (#73)
    Version binding None Dataset version and fragments (needed for #72's cache)

    So #72 keeps its own raw-key layout. Interchange with LadybugDB stays possible as a separate export step that maps keys to dense positions against one pinned node-table version. We can open that as its own issue if someone needs it.

    Closing this evaluation; #72 and #80 stay open.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions