Skip to content

fix(python): correct primitive list byte-length serialization#3570

Open
utafrali wants to merge 1 commit intoapache:mainfrom
utafrali:fix/issue-3506-fdl-xlang-mismatch-between-rust-and-pyth
Open

fix(python): correct primitive list byte-length serialization#3570
utafrali wants to merge 1 commit intoapache:mainfrom
utafrali:fix/issue-3506-fdl-xlang-mismatch-between-rust-and-pyth

Conversation

@utafrali
Copy link
Copy Markdown
Contributor

Contribution Checklist

  • PR title follows Conventional Commits
  • Performance benchmarks included if applicable

Why?

Fixes #3506

Rust and Python had a mismatch in how they serialize list lengths for fixed-size primitive types. Python was writing element count, but Rust expects byte length. This broke deserialization when reading INT16, INT32, or FLOAT64 lists.

What does this PR do?

Added a helper function to identify types that need byte-length encoding (INT16, INT32, FLOAT64) and updated the serialization logic to write byte count instead of element count for fixed-size types without nulls.

Related issues

Closes #3506

User-facing changes

N/A

Benchmark

N/A

@utafrali utafrali requested a review from chaokunyang as a code owner April 14, 2026 16:16
@chaokunyang
Copy link
Copy Markdown
Collaborator

chaokunyang commented Apr 14, 2026

Please create pr from latest main branch. And we also need a python test between list and tuple

@utafrali
Copy link
Copy Markdown
Contributor Author

Got it, I'll rebase from latest main and add the list vs tuple test.

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.

FDL xlang mismatch between Rust and Python - deserialization failure

2 participants