Skip to content
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

TableDef: clarify generated_* methods #1419

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 13, 2024

Description of Changes

To improve my understanding of what TableDef and TableSchema actually do wrt. indices & constraints, I slightly refactored the TableDef::generated_* methods and added commentary. This should make it easier to understand the implementation of the index hack I am working on.

One semantic aspect that changed here is that I removed the binary searches -- they don't seem to be correct, as I did not determine that we actually keep a sorted order by name in a TableDef.

This patch is likely to become obsolete once the new schema impl is written, but I found it helpful in the interim.

API and ABI breaking changes

None

Expected complexity level and risk

1

@Centril Centril requested a review from kazimuth June 13, 2024 13:47
Copy link
Contributor

@kazimuth kazimuth left a comment

Choose a reason for hiding this comment

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

Makes sense.

This is convincing me that IndexId, etc should be kept separate from Ref<IndexDef> because there aren't corresponding indices like this in the schema.

Unless I should construct those when building a schema... hmmm....

@Centril Centril added this pull request to the merge queue Jun 13, 2024
Merged via the queue into master with commit e808c1e Jun 13, 2024
9 checks passed
@Centril Centril deleted the centril/table-def-generated-clarify branch June 13, 2024 19:57
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