Skip to content

Expand multi-hop patterns without materializing every intermediate row #78

Closed
1 of 1 issue completed

Description

@prrao87

Problem

Each CSR hop emits one fully materialized Arrow row per match, and the DataFusion operators above it work on those flat rows. In multi-hop patterns the number of intermediate rows multiplies at every hop, even when the query only needs counts or a few columns at the end. Factorized engines such as Kuzu and LadybugDB carry neighbour lists between operators instead and expand them only when needed.

Idea

Let CSR operators pass neighbour lists (or counts) between hops, and expand them into rows only when an operator needs individual rows, at the latest the RETURN. This is independent of how the CSR is stored.

FFX exploration

This is a research direction for the general mechanism below. Completing the investigation alone does not close this issue.

Done so far (post 0.6.1)

Special cases have shipped. The general mechanism has not: hops still emit one row per match.

Still open

Closed and split up (November 2026): each open item now has its own issue, #134, #135, #136 and #99, so that each can be scoped and closed on its own. #105, the FFX investigation, moved under #134.

Activity

  1. prrao87 commented on Nov 7, 2026

    @prrao87
    MemberAuthor

    Boxes 4 and 5 are done: #131 counts same-type hops that share an end, #132 undirected hops and #133 an OPTIONAL MATCH second hop. The rest is split into separate issues so each can be scoped and closed on its own:

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