Repository navigation
[server] Support adding nested fields to ROW columns - #4905
Draft
raoluSmile wants to merge 1 commit into
Draft
raoluSmile wants to merge 1 commit into
raoluSmile wants to merge 1 commit into
Conversation
raoluSmile
marked this pull request as ready for review
October 27, 2026 03:10
raoluSmile
marked this pull request as draft
October 27, 2026 03:11
2 tasks done
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.
Purpose
Linked issue: #4889
This PR introduces the API, RPC and coordinator-side metadata support for adding nested fields to ROW columns. Runtime read/write adaptation and recovery integration will follow in separate PRs.
This PR implements the API and coordinator-side metadata changes for adding nullable fields to existing ROW columns, as part of the nested schema evolution work tracked by the linked issue.
For example, at the schema metadata level, a column defined as
profile ROW<name STRING>can be extended toprofile ROW<name STRING, age INT>. Fields can also be appended to ROW types nested within other ROW types.This is a partial implementation. Runtime adaptation for existing data, read/write and recovery integration, Flink SQL support, and field additions inside ARRAY are follow-up work.
The PR is intended for early review and design discussion alongside the planned FIP. It does not provide complete end-to-end nested schema evolution on its own.
Brief change log
ColumnPathto represent paths to nested fields andTableChange.addNestedField(...)to describe a nested field addition.AlterTableRequestwith nested field additions and implement the corresponding client/server RPC conversions.highestFieldId.Tests
Added or extended coverage in:
ColumnPathTest: path construction, parsing, validation, immutability, equality, serialization and nested field change construction.ClientRpcMessageUtilsTest: nested field request serialization and deserialization alongside existing alter-table operations.ServerRpcMessageUtilsTest: nested field request conversion, optional comments, path segments and malformed request validation.SchemaUpdateNestedFieldTest: nested ROW field additions, field ID allocation, metadata preservation, invalid changes and schema registration throughMetadataManager.End-to-end read/write and recovery coverage will accompany the runtime integration work.
API and Format
ColumnPathtype and theTableChange.addNestedField(...)API.PbColumnPathSegment,PbAddNestedFieldand theadd_nested_fieldsfield to the alter-table RPC request.Mixed-version behavior and end-to-end data compatibility are not established by the tests in this PR.
Documentation
Adds Javadocs for the new API.
User-facing documentation and SQL examples will be added with the end-to-end feature. The proposed API, semantics and implementation plan will be discussed in the FIP.