You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kamcheungting-db (via GitHub)" <gi...@apache.org> on 2026/09/30 08:16:55 UTC
[PR] fix(serde): align DataFile JSON with Java core [iceberg-cpp]
kamcheungting-db opened a new pull request, #975:
URL: https://github.com/apache/iceberg-cpp/pull/975
## Summary
Make core `DataFile` JSON compatible with Java Iceberg.
This PR only changes `DataFile` JSON behavior. Core `FileScanTask` serde is added separately in #939.
## Changes with examples
### Partition data
Continue accepting positional arrays:
```json
"partition": [7]
```
Also accept Java field-ID objects, which do not depend on field order:
```json
"partition": {"1000": 7}
```
### Binary metadata
Write binary values as Java-compatible hexadecimal strings:
```json
"key-metadata": "0A0B"
"lower-bounds": {"keys": [1], "values": ["01000000"]}
```
Previously these values were written as JSON byte arrays.
### Content names
Accept both current lowercase values and older Java enum-style values:
```json
"content": "position-deletes"
"content": "POSITION_DELETES"
```
### Integers
Reject values that are not actual, in-range JSON integers. For example:
```json
"record-count": 1.5
```
Previously generic JSON conversion could coerce this to `1`.
The parser also accepts a missing `partition`, accepts null metric maps, rejects duplicate metric keys, and validates partition value types during serialization.
## Stack
This is **2 of 4** and depends on #974:
1. Move `DataFile` serde into core (#974)
2. **This PR:** Java-compatible `DataFile` JSON
3. Add core `FileScanTask` serde (#939)
4. Validate schema and partition IDs strictly (#940)
Each PR targets `main`; later PRs contain the commits from earlier PRs.
## Testing
- `DataFile` focused tests: 23 passed across core and REST.
- Full stack: 142 JSON serde tests passed.
- Full stack: 332 REST tests passed; 1 existing test skipped.
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(serde): make DataFile JSON compatible with Java Iceberg [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #975:
URL: https://github.com/apache/iceberg-cpp/pull/975
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org