arrow-graph-git
Graph-native git primitives on Arrow RecordBatches.
Version-control RDF-like knowledge graphs with 8 git operations:
- commit — snapshot graph state to Parquet
- checkout — restore graph state from a commit
- diff — object-level comparison between commits
- merge — 3-way merge with conflict detection and resolution strategies
- rebase — replay commits onto a new base
- blame — trace which commit introduced a triple
- cherry-pick — apply specific commits to current state
- revert — undo a commit's changes
Built on arrow-graph-core for the underlying graph store.
Quick Start
use Triple;
use ;
let dir = tempdir.unwrap;
let mut obj = with_snapshot_dir;
let mut commits = new;
// Add data and commit
let triple = Triple ;
obj.store.add_triple.unwrap;
let c1 = create_commit.unwrap;
// Checkout restores state from any commit
checkout.unwrap;
Merge Strategies
use ;
// Automatic conflict resolution
let result = merge_with_strategy.unwrap;
Available strategies: Ours, Theirs, LastWriterWins, or custom closures.
Crash-Safe Persistence
use ;
// WAL + atomic rename — safe against crashes
save.unwrap;
restore.unwrap;
Performance
Benchmarked on Apple M4 (10K triples):
| Operation | Time | Gate |
|---|---|---|
| Commit | ~3ms | < 25ms |
| Checkout | ~1.3ms | < 25ms |
| Save+Restore | ~4.3ms | < 100ms |
| Batch add 10K | ~4.3ms | < 10ms |
License
MIT