Skip to content

GH-22342: [C++] [Documentation] Clarify Union type ids - #50839

Open
erichanwang wants to merge 2 commits into
apache:mainfrom
erichanwang:docs/union-typeids-22342
Open

GH-22342: [C++] [Documentation] Clarify Union type ids#50839
erichanwang wants to merge 2 commits into
apache:mainfrom
erichanwang:docs/union-typeids-22342

Conversation

@erichanwang

Copy link
Copy Markdown

Rationale for this change

The Union layout documentation does not explain that the type IDs stored in the types buffer can differ from the child array indices, or how the optional typeIds metadata maps children to physical type IDs.

What changes are included in this PR?

  • Document the relationship between Union child array indices, physical type IDs, and the optional typeIds metadata.
  • Clarify that the types buffer stores the type ID for each slot.

Fixes #22342.

Are these changes tested?

git diff --check passes and the RST change was reviewed against Schema.fbs and the existing Union layout documentation. A local Sphinx/RST checker is not installed in this environment.

Are there any user-facing changes?

No.

@erichanwang
erichanwang requested a review from pitrou as a code owner August 10, 2026 00:14
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #22342 has been automatically assigned in GitHub to PR creator.

@erichanwang

Copy link
Copy Markdown
Author

Formatting follow-up:

  • Wrapped the new Union type-id paragraph to match the surrounding Arrow RST line-wrapping style.
  • git diff --check passes; no semantic content changed.

@uros-b

uros-b commented Aug 10, 2026

Copy link
Copy Markdown
Member

Nice focused improvement, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] [Documentation] add discussion of Union.typeIds to Layout.rst

2 participants