{"record":{"id":"60587ce55c59fe12","repo":"prestodb/presto","slug":"not-supported-60587c","errorCode":"NOT_SUPPORTED","errorMessage":"File format not supported for Iceberg: ","messagePattern":"File format not supported for Iceberg: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergFileWriterFactory.java","lineNumber":128,"sourceCode":"    }\n\n    public IcebergFileWriter createFileWriter(\n            Path outputPath,\n            Schema icebergSchema,\n            JobConf jobConf,\n            ConnectorSession session,\n            HdfsContext hdfsContext,\n            FileFormat fileFormat,\n            MetricsConfig metricsConfig)\n    {\n        switch (fileFormat) {\n            case PARQUET:\n                return createParquetWriter(outputPath, icebergSchema, jobConf, session, hdfsContext, metricsConfig);\n            case ORC:\n            case DWRF:\n                return createOrcWriter(outputPath, icebergSchema, jobConf, session);\n        }\n        throw new PrestoException(NOT_SUPPORTED, \"File format not supported for Iceberg: \" + fileFormat);\n    }\n\n    private IcebergFileWriter createParquetWriter(\n            Path outputPath,\n            Schema icebergSchema,\n            JobConf jobConf,\n            ConnectorSession session,\n            HdfsContext hdfsContext,\n            MetricsConfig metricsConfig)\n    {\n        List<String> fileColumnNames = icebergSchema.columns().stream()\n                .map(Types.NestedField::name)\n                .collect(toImmutableList());\n        List<Type> fileColumnTypes = icebergSchema.columns().stream()\n                .map(column -> toPrestoType(column.type(), typeManager))\n                .collect(toImmutableList());\n\n        try {","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergFileWriterFactory.java#L110-L146","documentation":"Thrown by IcebergFileWriterFactory.createFileWriter when the table's file format is neither PARQUET, ORC, nor DWRF — the only formats the Iceberg connector can write. Any other IcebergFileFormat value (e.g. a format added later or a legacy/incorrect table property) has no writer implementation.","triggerScenarios":"Writing data to an Iceberg table whose format property resolves to an unsupported file format, e.g. after switching iceberg.file-format to a value unsupported by the connector or hitting the fall-through after the switch's PARQUET/ORC/DWRF cases.","commonSituations":"Table properties manually edited to a wrong format, new format enum values from a newer Iceberg lib not yet supported by the Presto writer, or mixed-version clusters where the coordinator knows a format the writer does not.","solutions":["Set the table's file format to a supported value: ALTER TABLE t SET PROPERTIES format = 'PARQUET' (or ORC)","Recreate the table with format='PARQUET' and copy data if the current format cannot be changed in place","Upgrade Presto to a version that supports the requested file format"],"exampleFix":"// before\nALTER TABLE t SET PROPERTIES format = 'AVRO'; -- unsupported for Iceberg writes\n// after\nALTER TABLE t SET PROPERTIES format = 'PARQUET';","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"PARQUET\", \"ORC\", \"DWRF\");\nif (!supported.contains(format.toUpperCase())) throw new IllegalArgumentException(\"File format not supported for Iceberg: \" + format);","typeGuard":null,"tryCatchPattern":"try { /* INSERT/CTAS into iceberg table */ } catch (PrestoException e) { if (\"NOT_SUPPORTED\".equals(e.getErrorCode().getName()) && e.getMessage().contains(\"File format not supported for Iceberg\")) { /* switch table format to PARQUET and retry */ } else throw e; }","preventionTips":["Always create Iceberg tables with format='PARQUET' (or ORC) explicitly","Do not set Iceberg table format properties by hand","Check connector release notes before using newly introduced file formats"],"tags":["iceberg","file-format","not-supported","writer"],"backgroundTag":"unsupported-file-format","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}