[FLINK-40120][table] Persist RowData field names in RowDataSerializerSnapshot#28717
Open
weiqingy wants to merge 1 commit into
Open
[FLINK-40120][table] Persist RowData field names in RowDataSerializerSnapshot#28717weiqingy wants to merge 1 commit into
weiqingy wants to merge 1 commit into
Conversation
…Snapshot Add the top-level field names to RowDataSerializerSnapshot so they survive a save/restore round-trip, as shared infrastructure for schema-aware consumers. The names are written unconditionally and the change is behavior-neutral: no compatibility or evolution logic is added. The snapshot format moves V3 to V4; V4 readers still read V3 snapshots (names absent -> null), so existing savepoints continue to restore. Generated-by: Claude Code (Claude Opus 4.8)
1531ba8 to
3ebefb0
Compare
Collaborator
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This pull request persists the top-level field names of a
RowDatastate serializer inRowDataSerializerSnapshot, so they survive a save/restore round-trip. Today the snapshot stores the field types but not the names.It is a self-contained, shared building block: the names are needed by schema-aware consumers — the State Catalog (FLIP-599) to expose a readable schema for keyed state, and name-based schema evolution (FLIP-527). They are written unconditionally and decoupled from any evolution logic, so whichever effort lands first establishes a single snapshot format.
Brief change log
String[] fieldNamestoRowDataSerializer, threaded throughduplicate()and the snapshot round-trip;equals/hashCodeare unchanged (names derive from the types).RowDataSerializerSnapshotfrom V3 to V4, appending the names block after the existing types / nested-serializer section.readSnapshotreads the names only forreadVersion >= 4, so V4 readers still restore V3 snapshots (names absent ->null).InternalSerializersbuilds the ROW serializer with its top-level field names (split from the structured-type case, which stays name-less).Verifying this change
This change added tests and can be verified as follows:
ROWfield names remain recoverable from the child logical types.fieldNames == nulland the serializer still round-trips.InternalSerializers.create(<a RowType>)yields a serializer whose snapshot carries the names unconditionally.duplicate()preserves the names.resolveSchemaCompatibilityis unchanged: a field-type-array difference still returnsincompatible()regardless of names.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noRowDataSerializer/RowDataSerializerSnapshot, snapshot format V3 -> V4RowDatastate snapshot format moves V3 -> V4. Backward compatible: V4 readers restore V3 snapshots (names absent ->null); no runtime behavior change.Documentation
Was generative AI tooling used to co-author this PR?