Skip to content

[python] Fix non-compact decimal and timestamp serialization in BinaryRow#7608

Open
plusplusjiajia wants to merge 5 commits intoapache:masterfrom
plusplusjiajia:fix-decimal
Open

[python] Fix non-compact decimal and timestamp serialization in BinaryRow#7608
plusplusjiajia wants to merge 5 commits intoapache:masterfrom
plusplusjiajia:fix-decimal

Conversation

@plusplusjiajia
Copy link
Copy Markdown
Member

@plusplusjiajia plusplusjiajia commented Apr 7, 2026

Purpose

Previously python's GenericRowSerializer treated all decimal and timestamp fields as compact format (value stored directly in the 8-byte fixed slot). Java's BinaryRow uses two formats:

Type Compact Non-compact
DECIMAL precision ≤ 18: unscaled long in fixed slot precision > 18: big-endian bytes in variable area, (offset << 32 | length) in fixed slot
TIMESTAMP precision ≤ 3: epoch millis in fixed slot precision > 3: epoch millis in variable area, (offset << 32 | nanoOfMillisecond) in fixed slot

@plusplusjiajia plusplusjiajia changed the title [python] Fix decimal deserialization for non-compact precision (> 18) [python] Fix non-compact decimal and timestamp serialization in BinaryRow Apr 8, 2026
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.

1 participant