Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove the primary key from the MultiIndex key specification #533

Closed
maurolacy opened this issue Nov 4, 2021 · 0 comments · Fixed by #569
Closed

Remove the primary key from the MultiIndex key specification #533

maurolacy opened this issue Nov 4, 2021 · 0 comments · Fixed by #569
Labels
breaking Breaking changes storage plus

Comments

@maurolacy
Copy link
Contributor

maurolacy commented Nov 4, 2021

In MultiIndex, remove the primary key from the index key specification (i.e. when building / defining the `MultiIndex). That is, handle index key multiplicity internally, using the pk or another method.

This can be done by signalling the pk type with its own generic type (see #531), and then internally building an index key of type (IK, PK), that is, a tuple of Index key and Primary key. Of course, the index function must return (IK, PK) accordingly. (done by collapsing the ik, concatenated with the pk (#569)).

Alternatively, if the above is not possible make the index function type-aware on the pk element. That is, instead of using a bytes vector, use a proper type for the pk element. So that it's easier to handle internally. (not a good idea, as the pk is already in raw format at the indexes level)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
breaking Breaking changes storage plus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant