Skip to content

Conversation

@LucaCappelletti94
Copy link
Contributor

As per title, this PR adds support for the ALTER OPERATOR syntax, and simplifies a bit the existing CREATE OPERATOR struct to reduce the code duplication between the two statement representations in the AST.

Keyword::MERGES => {
options.push(OperatorOption::Merges);
}
_ => unreachable!(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we return an error here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To future proof this, I have added:

[lints.clippy]
unreachable = "forbid"

To the Cargo.toml, so it will be clearer. There are a few unreachable in the lib, I will go through them and change them into errors.

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, now unreachable patterns in the lib will trigger clippy. I have replaced all unreachable patterns with errors, or simplified them out when reasonable in their context.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! Thank you!

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 Dec 4, 2025
Merged via the queue into apache:main with commit 326f111 Dec 4, 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