Skip to content

[rust] Preserve highest_field_id during Schema JSON deserialization - #4184

Merged
fresh-borzoni merged 2 commits into
apache:mainfrom
beryllw:fluss-rust/fix-schema-highest-field-id
Sep 1, 2026
Merged

[rust] Preserve highest_field_id during Schema JSON deserialization#4184
fresh-borzoni merged 2 commits into
apache:mainfrom
beryllw:fluss-rust/fix-schema-highest-field-id

Conversation

@beryllw

@beryllw beryllw commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4181

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 for the PR, LGTM, minor non-blocking comments

Nice catch. Java doesn't have this check: SchemaJsonSerde takes whatever's in the JSON, so we'd reject metadata the Java client reads. Probably unreachable, but was rejecting deliberate over clamping to max()?

The !columns_with_ids.is_empty() guard leaves a hole: {"columns": [],"highest_field_id": -3} deserializes fine and keeps -3, below the -1 default.

schema_nested_row_round_trips_through_json uses highest == max, so it wouldn't have caught this.

@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 79c71c2 into apache:main Sep 1, 2026
21 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] Schema JSON serde does not preserve highest_field_id

2 participants