Skip to content

feat(xlang): compatible read between list array field#3650

Merged
chaokunyang merged 24 commits intoapache:mainfrom
chaokunyang:xlang_list_array_compatible_read
May 7, 2026
Merged

feat(xlang): compatible read between list array field#3650
chaokunyang merged 24 commits intoapache:mainfrom
chaokunyang:xlang_list_array_compatible_read

Conversation

@chaokunyang
Copy link
Copy Markdown
Collaborator

@chaokunyang chaokunyang commented May 6, 2026

Why?

Xlang compatible mode could not evolve a top-level list field into a primitive array field, or the reverse, even when the element type and wire payload were compatible. That blocked schema evolution for common collection fields across runtimes.

What does this PR do?

  • Adds top-level compatible-mode matching between list fields and dense primitive array fields while keeping nested list/array schemas distinct.
  • Implements compatible list-to-array and array-to-list reads across Java, C++, C#, Go, Rust, Swift, JavaScript/TypeScript, Dart, and Python, including rejection of nullable or ref-tracked list payloads where dense arrays cannot represent them.
  • Extends generated/read-path handling, type metadata comparison, and primitive element decoding for the new compatibility cases.
  • Adds runtime, compatible-mode, and xlang peer tests for list-to-array, array-to-list, nullable-list failure, and primitive encoding variants.
  • Updates the xlang serialization/type-mapping docs and adjusts benchmark support for JavaScript BoolArray round trips and the Swift benchmark config API.

Related issues

None.

AI Contribution Checklist

  • Substantial AI assistance was used in this PR: yes / no
  • If yes, I included a completed AI Contribution Checklist in this PR description and the required AI Usage Disclosure.
  • If yes, my PR description includes the required ai_review summary and screenshot evidence of the final clean AI review results from both fresh reviewers on the current PR diff or current HEAD after the latest code changes.

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

Not run as part of this description update.

@chaokunyang chaokunyang requested a review from theweipeng as a code owner May 6, 2026 09:16
@chaokunyang chaokunyang requested review from pandalee99 and urlyy May 6, 2026 09:23
@chaokunyang chaokunyang requested a review from PragmaTwice as a code owner May 6, 2026 10:51
@chaokunyang chaokunyang merged commit a02a5a2 into apache:main May 7, 2026
71 checks passed
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