losfair / losfair/RefineDB

Packed tables.

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
395
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Given a table like:

```
type PostInfo {
author: string,
title: string,
content: string,
create_time: string,
}
```

It's often useful to store all fields in a single key-value entry to reduce query overhead.

That's what the `@packed` attribute is for:

```
type Post {
@primary
id: string,
@packed
info: PostInfo,
}
```

However currently the `@packed` attribute is only implemented on the syntax level, and not pushed down to either the storage plan or TreeWalker.

Changes needed for `@packed`:

- Storage planner: Treat packed fields as a leaf node.
- TreeWalker: Keep track of the packed/unpacked kind of any `set` and `table` DFG nodes.
- TreeWalker: Lens-like structure for looking inside a packed field.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the storage planner and TreeWalker entry points, then trace how set and table DFG nodes represent fields. Implement packed fields as storage-planner leaves and preserve packed/unpacked state through TreeWalker, including a lens-like way to inspect packed fields; done means all three listed behaviors are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.