Skip to content

manifests metadata table reports file counts in both data and delete columns #2812

Description

@gmhelmold

The manifests metadata table writes every manifest's added/existing/deleted counts into both the *_data_files_count and *_delete_files_count columns, regardless of the manifest's content type — a data manifest reports phantom delete-file counts, and a delete manifest reports phantom data-file counts.

The reference implementation gates each column by content type (ManifestsTable.java, manifestFileToRow):

manifest.content() == ManifestContent.DATA    ? manifest.addedFilesCount() : 0, // added_data_files_count
manifest.content() == ManifestContent.DELETES ? manifest.addedFilesCount() : 0, // added_delete_files_count

In crates/iceberg/src/inspect/manifests.rs the six append_value sites use the same ManifestFile counts unconditionally. Easy to see with a snapshot containing one data and one deletes manifest: both rows show identical counts in all six columns.

Found while exploring #823. I have a fix with tests ready; PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions