Skip to content

[FLINK-40122][table] Expose a public getter for the persisted RowData field names#28718

Closed
weiqingy wants to merge 2 commits into
apache:masterfrom
weiqingy:FLINK-40122-impl
Closed

[FLINK-40122][table] Expose a public getter for the persisted RowData field names#28718
weiqingy wants to merge 2 commits into
apache:masterfrom
weiqingy:FLINK-40122-impl

Conversation

@weiqingy

Copy link
Copy Markdown

What is the purpose of the change

This pull request adds a public getter on RowDataSerializerSnapshot that returns the top-level RowData field names persisted by FLINK-40120, so external consumers can read them. It returns null for legacy snapshots (version 3 and earlier) written before field-name persistence.

Note: this PR stacks on #28717 (FLINK-40120), which is under review. Until #28717 merges, the diff here also contains its changes; the net-new change in this PR is the single public getter (see the latest commit). It will be rebased onto a clean master once #28717 merges.

Brief change log

  • Add public @Nullable String[] getFieldNames() on RowDataSerializerSnapshot, returning the persisted top-level field names (null for legacy version-3-and-earlier snapshots).

Verifying this change

This change added tests and can be verified as follows:

  • snapshotPublicGetterReturnsPersistedNames — a snapshot taken from a named serializer returns the top-level names through the public getter.
  • A restored version-3-layout snapshot's getFieldNames() returns null.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no — the getter is on RowDataSerializerSnapshot, whose enclosing RowDataSerializer is @Internal
  • The serializers: yes — adds a read-only accessor on RowDataSerializerSnapshot; no change to the serialization format or behavior
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager, Checkpointing, Kubernetes/Yarn, ZooKeeper: no — read-only accessor, no format or restore-behavior change
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable (the getter carries JavaDoc)
Was generative AI tooling used to co-author this PR?
  • Yes (Claude Code, Claude Opus 4.8)

Generated-by: Claude Code (Claude Opus 4.8)

weiqingy added 2 commits July 10, 2026 22:23
…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)
… field names

Add a public getter on RowDataSerializerSnapshot that returns the top-level
RowData field names persisted by FLINK-40120, so external consumers such as the
State Catalog can read them. Returns null for legacy snapshots (version 3 and
earlier) written before field-name persistence.

No format or behavior change: the getter only exposes the already-persisted
names; the wire format, compatibility resolution, and equality are unchanged.

Generated-by: Claude Code (Claude Opus 4.8)
@flinkbot

flinkbot commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@weiqingy

Copy link
Copy Markdown
Author

Closing for now — this stacks on #28717 (FLINK-40120), so the diff here includes that PR's changes. I'll open the getter as a clean PR once #28717 merges; it's tracked by sub-task FLINK-40122. Branch and commit are preserved.

@weiqingy weiqingy closed this Jul 11, 2026
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