Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new Snapshot write action to the Logical Query Protocol, allowing users to capture an immutable snapshot of an IDB (Intensional Database) and turn it into an EDB (Extensional Database) under a specified path. This is the third attempt at implementing this feature.
Changes:
- Added
Snapshotmessage to the protobuf specification withdestination_path(repeated string) andsource_relation(RelationId) fields - Updated all three SDK language bindings (Python, Go, Julia) with generated protobuf code
- Extended the grammar to parse and pretty-print snapshot syntax:
(snapshot ["path" "elements"] :relation_id) - Added comprehensive test coverage demonstrating single and multi-element paths with various source relation types
Reviewed changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| proto/relationalai/lqp/v1/transactions.proto | Added Snapshot message definition to Write oneof (field 5, using reserved field 4 was avoided) |
| sdks/python/src/lqp/proto/v1/transactions_pb2.pyi | Python type stubs for Snapshot message |
| sdks/python/src/lqp/proto/v1/transactions_pb2.py | Python generated protobuf code for Snapshot |
| sdks/go/src/lqp/v1/transactions.pb.go | Go generated protobuf code with Snapshot message and getter methods |
| sdks/go/src/print.go | Added pretty-printing support for snapshot action using BRACKET for paths |
| sdks/julia/LogicalQueryProtocol/src/gen/relationalai/lqp/v1/*.jl | Julia generated protobuf code with Snapshot struct and encode/decode functions |
| meta/src/meta/grammar.y | Added snapshot grammar rule with construct/deconstruct for parsing and printing |
| tests/lqp/snapshot.lqp | Test demonstrating snapshot functionality with minimal formatting |
| tests/pretty/snapshot.lqp | Test with expanded/pretty-printed format including configure block |
| tests/bin/snapshot.bin | Binary representation of the test transaction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdks/julia/LogicalQueryProtocol/src/gen/relationalai/lqp/v1/transactions_pb.jl
Show resolved
Hide resolved
sdks/julia/LogicalQueryProtocol/src/gen/relationalai/lqp/v1/fragments_pb.jl
Show resolved
Hide resolved
staworko
left a comment
There was a problem hiding this comment.
LGTM. A couple of minor cosmetic suggestions.
| # Autogenerated using ProtoBuf.jl v1.2.0 on 2026-02-09T13:12:21.246 | ||
| # original file: /Users/nystrom/rai/nn-meta-12-go-tools/proto/relationalai/lqp/v1/logic.proto (proto3 syntax) | ||
| # Autogenerated using ProtoBuf.jl v1.2.0 on 2026-02-17T13:30:36.950 | ||
| # original file: /Users/niko/Projects/logical-query-protocol/proto/relationalai/lqp/v1/logic.proto (proto3 syntax) |
There was a problem hiding this comment.
Can we remove logic_pb.jl and and fragments_pb.jl from the diff for clarity?
There was a problem hiding this comment.
Actually let me file a PR against ProtoBuf.jl to stop including this information...
| ;; Define the EDBs we're going to be referring to. | ||
| (define | ||
| (fragment :snapshots | ||
| (rel_edb :snapshot1 ["my_edb"] []) |
There was a problem hiding this comment.
Should we swap the fields of snapshot to be consistent with rel_edb?
I can see an argument against (in rel_edb we are "reading from" an edb and in snapshot we are "writing to" and edb), and it's not blocking, but asking anyway.
There was a problem hiding this comment.
It was intended to reflect the read/write 🤔
Uh oh!
There was an error while loading. Please reload this page.