Skip to content

Conversation

@nicktobey
Copy link
Contributor

@nicktobey nicktobey commented Feb 18, 2025

This is the GMS part of this change.

Dolt PR: dolthub/dolt#8870
Doltgres PR: dolthub/doltgresql#1214

The goal of the change is to allow for indexes to use an out-of-line variable-length type (like TEXT or BLOB) as a primary key while still storing just the address in the index (instead of being forced to store a prefix of the value).

As a result of this change, any tuple comparison operation may need to resolve a hash in the NodeStore. This poses two complications:

  1. The tuple logic exists at a much lower level than the node store and can't depend on it without creating a dependency cycle. We get around this with a new ValueStore interface that can store and retrieve variable-length bytestrings by their content hash. NodeStore is the only implementation of this interface, but decoupling the interface from the implementation allows us to not depend on NodeStore's internals when passing it to lower-level code.

  2. Tuple comparison operations can now end up doing disk IO, which means they need a context parameter.

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

@nicktobey nicktobey merged commit a3d336d into main Feb 24, 2025
8 of 9 checks passed
@nicktobey nicktobey deleted the nicktobey/textindex branch February 24, 2025 21:24
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.

3 participants