Skip to content

Conversation

LucaCappelletti94
Copy link
Contributor

As per title, this PR moved all of the struct variants out of the TableConstraint enum. This is done to allow for implementing traits in dependent crates which only apply to some of the variants and not all of them.

Furthermore it:

  • Implemented Display and Spanned for each of the new structs
  • Implemented From<variant> for TableConstraint for all variants
  • Documented the variants and updated tests

This PR closes issue #2053

Ciao,
Luca

@@ -0,0 +1,67 @@
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can use a single file table_constraints.rs to contain the new structs, vs having one struct per file. So that we don't end up accumulating a lot of small files which would be the other extreme of where we are today

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok - should the table_constraints.rs file contain the TableConstraint enum itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in commit 258cc8c

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @LucaCappelletti94!

@iffyio iffyio added this pull request to the merge queue Oct 8, 2025
Merged via the queue into apache:main with commit 8c82fc0 Oct 8, 2025
10 checks passed
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