You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "gyang94 (via GitHub)" <gi...@apache.org> on 2026/10/19 05:58:58 UTC

[PR] [common] Fix nested field IDs in Schema.Builder.fromColumns [fluss]

gyang94 opened a new pull request, #4725:
URL: https://github.com/apache/fluss/pull/4725

   ### Purpose
   
   Closes #4724.
   
   `Schema.Builder.fromColumns` leaves nested row field IDs unset when all input column IDs are unknown (`-1`). Multiple nested fields then fail the global ID uniqueness check. Assign IDs across the full nested structure using the builder's shared counter.
   
   ### Brief change log
   
   - Reuse `ReassignFieldId` when adopting columns with unknown IDs.
   - Add a regression test for multiple row nesting levels, subsequent column allocation, column metadata, and unchanged input columns.
   - Clarify when `fromColumns` preserves or assigns IDs.
   
   ### Tests
   
   - Confirmed the new regression test fails before the fix: `Found 4 unique IDs but expected 6`.
   - `mvn -B -pl fluss-common -am spotless:apply verify` passed with Maven 3.8.6 and JDK 11, including Spotless, Checkstyle, and RAT.
   - Test reports: `fluss-common` — 2,064 tests, 1 skipped; `fluss-test-utils` — 11 tests, 3 skipped. No failures or errors.
   
   ### API and Format
   
   No public API signatures or serialized formats change. Columns with assigned IDs retain their existing IDs.
   
   ### Documentation
   
   Updated the `fromColumns` Javadoc.
   
   Generative AI disclosure: OpenAI Codex was used to author the implementation and regression test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org