Skip to content

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Jan 30, 2026

No description provided.

…iveLiteral

The Python bindings expose partition values from manifest files via
PyPrimitiveLiteral.value(), but this loses type information for:
- Decimal: Int128 returns Python int, losing scale information
- UUID: UInt128 returns Python int instead of uuid.UUID

Add three methods to PyPrimitiveLiteral:
- decimal_value(scale): Convert Int128 to decimal.Decimal with proper scale
- uuid_value(): Convert UInt128 to uuid.UUID
- literal_type(): Return type name for runtime type detection

This enables pyiceberg to properly convert partition values when reading
manifest files through the Rust bindings.

Related: apache#2062
@geruh geruh closed this Jan 30, 2026
@geruh geruh deleted the python-decimal-uuid-methods branch January 30, 2026 00:22
@geruh geruh restored the python-decimal-uuid-methods branch January 30, 2026 00:36
@geruh geruh changed the title feat(python): add decimal_value, uuid_value, literal_type to PyPrimitiveLiteral wip Jan 30, 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