badalprasadsingh opened a new issue, #1853:
URL: https://github.com/apache/iceberg-go/issues/1853
### Apache Iceberg version
main (development)
### Please describe the bug 🐞
Right now, `ManifestWriter` records its content type twice.
`ManifestWriter.meta()` writes the writer's content (`w.content`) into the
manifest file's own Avro metadata, but `ToManifestFile` hardcodes the `Content`
field of the returned `ManifestFile` to `ManifestContentData` instead of using
`w.content`.
A writer created with `WithManifestWriterContent(ManifestContentDeletes)`
therefore produces a `ManifestFile` that claims to be a data manifest.
Committing it into a manifest list yields metadata where the list entry and the
manifest file disagree.
Reading such a table back fails in `NewManifestReader`:
```
manifest file's 'content' metadata indicates "deletes", but entry from
manifest
list indicates "data"
```
Callers can only avoid this by passing the redundant option
`ToManifestFile(path, n, WithManifestFileContent(ManifestContentDeletes))`.
Every call site in the codebase, right now, does exactly that.
### Status
Will raise a PR for this fix.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]