Skip to content

[rust] Reject empty or duplicate primary key columns - #4182

Merged
fresh-borzoni merged 3 commits into
apache:mainfrom
beryllw:fluss-rust/validate-primary-keys
Sep 2, 2026
Merged

[rust] Reject empty or duplicate primary key columns#4182
fresh-borzoni merged 3 commits into
apache:mainfrom
beryllw:fluss-rust/validate-primary-keys

Conversation

@beryllw

@beryllw beryllw commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4180

Brief change log

Tests

API and Format

Documentation

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@beryllw Thank you, LGTM 👍 . While you're here, primary_key_named overwrites unconditionally, so calling it twice keeps the last one, whereas Java rejects with "Multiple primary keys are not supported." Shall we address it here as well?

@naivedogger naivedogger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1. One small follow-up from this earlier discussion: nested ROW field names are still not validated by fluss-rust. Blank or duplicate names are accepted, so Gateway validate_only returns 200 even though the server rejects the schema.

Could we track this as a follow-up fluss-rust fix as well? I’d be happy to help with it.

@beryllw

beryllw commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Could we track this as a follow-up fluss-rust fix as well? I’d be happy to help with it.

Agreed, let’s track it as a follow-up. Thanks!

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@beryllw Thank you, left one additional comment, PTAL

Comment thread fluss-rust/crates/fluss/src/metadata/table.rs Outdated

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@beryllw Thank you, LGTM 👍

@fresh-borzoni
fresh-borzoni merged commit 8ec4a6c into apache:main Sep 2, 2026
23 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.

[Bug][Rust] SchemaBuilder accepts empty or duplicate primary keys

3 participants