Skip to content

Conversation

DerGut
Copy link
Contributor

@DerGut DerGut commented Sep 12, 2025

Which issue does this PR close?

Closes #1669

What changes are included in this PR?

TableIdent now derives PartialOrd.

Are these changes tested?

No, it's only derived behavior. I'm happy to add a test, but I'm not 100% convinced it would add value.

@DerGut DerGut changed the title Derive PartialOrd feat: TableIdent derives PartialOrd Sep 12, 2025
@@ -225,7 +225,7 @@ impl Display for NamespaceIdent {
}

/// TableIdent represents the identifier of a table in the catalog.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Hash)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also derive Ord? I think TableIdent supports full order.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NamespaceIdent does 👍
Given there's no pushback to adding ordering in general, I agree that Ord represents it more accurately.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we update the PR?

Suggested change
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Hash)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Ord, Hash)]

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.

PartialOrd for TableIdent
3 participants