prestodb/presto · error · PrestoException

ICEBERG_UNKNOWN_MANIFEST_TYPE

ICEBERG_UNKNOWN_MANIFEST_TYPE

Error message

Unknown manifest file content: %s

What it means

ICEBERG_UNKNOWN_MANIFEST_TYPE thrown by readerForManifest when a ManifestFile's content() is neither DATA nor DELETES. The switch covers only the known Iceberg manifest content types, so an unrecognized enum value means a manifest written by a newer/unknown Iceberg spec version.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java:230

                true);

        try {
            return hdfsEnvironment.getFileSystem(hdfsContext, location);
        }
        catch (Exception e) {
            throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, format("Error getting file system at path %s", location), e);
        }
    }

    private static ManifestReader<? extends ContentFile<?>> readerForManifest(Table table, ManifestFile manifest)
    {
        switch (manifest.content()) {
            case DATA:
                return ManifestFiles.read(manifest, table.io());
            case DELETES:
                return ManifestFiles.readDeleteManifest(manifest, table.io(), table.specs());
            default:
                throw new PrestoException(ICEBERG_UNKNOWN_MANIFEST_TYPE, "Unknown manifest file content: " + manifest.content());
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto/Iceberg to a version whose Iceberg library recognizes the manifest content type
  2. Check which engine/version wrote the unknown manifests; align Iceberg library versions
  3. Quarantine or rewrite manifests using a compatible Iceberg tool before re-running cleanup

Example fix

// before
presto-iceberg built against iceberg 0.x that only knows DATA/DELETES
// after
Upgrade presto-iceberg dependency to an Iceberg version supporting the new manifest content type
Defensive patterns

Strategy: type-guard

Validate before calling

// Reject manifests with unknown content types before cleanup
boolean knownType = manifests.stream().allMatch(m ->
    m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES);

Type guard

boolean hasKnownManifestContent(ManifestFile m) {
    return m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES;
}

Try / catch

try {
    CALL system.remove_orphan_files(...)
} catch (PrestoException e) {
    if ("ICEBERG_UNKNOWN_MANIFEST_TYPE".equals(e.getErrorCode().getName())) {
        // upgrade Presto/Iceberg or rewrite manifests with a compatible writer
    }
}

Prevention

When it happens

Trigger: remove_orphan_files reading manifests where manifest.content() returns a value outside {DATA, DELETES} — practically only possible with manifests produced by a newer Iceberg library introducing a new content type.

Common situations: Table written/upgraded by a newer Iceberg runtime or engine with a manifest content type this Presto build doesn't know; mixed engine versions writing to the same table.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/d004d95e0c813d58. Report an issue: GitHub.