Skip to content

Introduce a unified LSMTree API #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Introduce a unified LSMTree API #469

merged 1 commit into from
Nov 26, 2024

Conversation

jorisdral
Copy link
Collaborator

@jorisdral jorisdral commented Nov 14, 2024

No description provided.

@jorisdral jorisdral self-assigned this Nov 14, 2024
@jorisdral jorisdral force-pushed the jdral/single-api branch 5 times, most recently from 7bedfcc to 36b4a77 Compare November 19, 2024 10:48
@jorisdral jorisdral marked this pull request as ready for review November 19, 2024 10:48
Comment on lines +134 to +138
type Table' :: (Type -> Type) -> Type -> Type -> Type -> Type
data Table' m k v b = forall h. Typeable h => Table' (Table m h)

instance NFData (Table' m k v b) where
rnf (Table' t) = rnf t
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of the pattern of defining these types here and using synonyms in the API modules, as synonyms can leak into error messages and it also makes the diff between them larger vs having three data Table there.

But the pattern already exists, so it makes sense to follow it here. 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our current setup, we need to expose the constructors for our NoThunks assertions, but @dcoutts suggested we do not expose the constructors from the public API. That's why I moved them here and added type synonyms in the public APIs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it would have been fine to expose the constructors in the public API, since if you want to do anything with the internal Table then you'll have to import Internal modules anyway

The new API unifies the `Normal` and `Monoidal` APIs, supporting both blob
references and mupserts, and is strictly more expressive. If a user does not
want to use blobs, then the blob type can be set to `Void`. If a user does not
intend to use the full potential of `Mupserts`, then the `ResolveAsFirst`
wrapper provides a sensible default instance for the `ResolveValue` class.
@jorisdral jorisdral added this pull request to the merge queue Nov 26, 2024
Merged via the queue into main with commit 31491d8 Nov 26, 2024
27 checks passed
@jorisdral jorisdral deleted the jdral/single-api branch November 26, 2024 17:11
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.

2 participants