Skip to content

PACKED logical and physical operators#584

Open
adsharma wants to merge 4 commits into
mainfrom
ffx
Open

PACKED logical and physical operators#584
adsharma wants to merge 4 commits into
mainfrom
ffx

Conversation

@adsharma

@adsharma adsharma commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Context: https://amine.io/papers/2026-sigmod-ffx.pdf

Based on the cited work, we implement:

  • PACKED_EXTEND (logical and physical)
  • PACKED_FILTER_COUNT (physical)

operators. More physical operators can be implemented in the future based on the desired optimization.

On this query:

  CALL enable_packed_path_extend=true;
  MATCH
    (:Leaf)-[:R1]->(c:Center)<-[:R2]-(l2:Leaf),
    (c)<-[:R3]-(l3:Leaf)
  WITH c.grp AS grp, l2.id AS l2id, l3.id AS l3id
  WHERE (l2id + l3id) % 10 = 0
  RETURN grp, count(*) AS cnt
  ORDER BY cnt DESC;

using the following synthetic graph:

from pathlib import Path

out = Path("/tmp/ffx_synth_csv")
centers = 1000
fanout = 200

with (out / "center.csv").open("w") as f:
    for c in range(centers):
        f.write(f"{c},{c % 10}\n")

with (out / "leaf.csv").open("w") as f:
    for i in range(centers * fanout):
        f.write(f"{i}\n")

for rel in ["r1", "r2", "r3"]:
    with (out / f"{rel}.csv").open("w") as f:
        for c in range(centers):
            base = c * fanout
            for j in range(fanout):
                f.write(f"{base + j},{c}\n")

we got:

baseline 0.282s ±0.1306,
packed 0.072s ±0.0056

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