You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2026/03/13 23:55:23 UTC
[I] Implement partition path generation (PartitionPathUtils) [paimon-rust]
luoyuxia opened a new issue, #127:
URL: https://github.com/apache/paimon-rust/issues/127
## Parent Issue
Part of #124 (support partitioned table)
Depends on #126 (BinaryRow deserialization)
## Background
Paimon stores data files under partition directories like `{table_path}/dt=2024-01-01/hr=12/bucket-0/`. Currently there is no code to convert partition values (from `BinaryRow`) into this filesystem path format.
## What needs to be done
1. **Create a partition path utility** (e.g., `spec/partition_utils.rs` or similar)
- Given partition keys (names from `TableSchema.partition_keys()`) + partition field types (from `TableSchema.fields()`) + partition values (decoded `BinaryRow`), generate the partition path string
- Format: `{key1}={value1}/{key2}={value2}/...`
2. **Handle value formatting per data type**
- `Int/BigInt/SmallInt/TinyInt` → integer string
- `VarChar/Char/String` → string value
- `Date` → `yyyy-MM-dd` format (days since epoch)
- `Timestamp` → appropriate timestamp string
- `Boolean` → `true`/`false`
- `Float/Double` → decimal string
- `Decimal` → decimal string
3. **Handle special cases**
- Null partition values → use `__DEFAULT_PARTITION__`
- Special characters in string values → URL encoding if needed (follow Java Paimon's behavior)
4. **Unit tests**
- Single partition key
- Multiple partition keys
- Different data types (string, int, date)
- Null partition value → `__DEFAULT_PARTITION__`
## Reference
- Java: [`PartitionPathUtils`](https://github.com/apache/paimon/blob/release-0.8.2/paimon-common/src/main/java/org/apache/paimon/utils/PartitionPathUtils.java)
## Affected files
- New file: `crates/paimon/src/spec/partition_utils.rs` (or integrated into existing module)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Implement partition path generation (PartitionPathUtils) [paimon-rust]
Posted by "QuakeWang (via GitHub)" <gi...@apache.org>.
QuakeWang commented on issue #127:
URL: https://github.com/apache/paimon-rust/issues/127#issuecomment-4060264587
@luoyuxia plz assign this to me : )
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org