{"record":{"id":"ba70aa4709cf3686","repo":"apache/iceberg","slug":"unsupported-type-s-ba70aa","errorCode":null,"errorMessage":"Unsupported type: %s","messagePattern":"Unsupported type: (.+?)","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetReaders.java","lineNumber":342,"sourceCode":"          return new ParquetValueReaders.ByteArrayReader(desc);\n        case INT32:\n          if (expected.typeId() == org.apache.iceberg.types.Type.TypeID.LONG) {\n            return new ParquetValueReaders.IntAsLongReader(desc);\n          } else {\n            return new ParquetValueReaders.UnboxedReader<>(desc);\n          }\n        case FLOAT:\n          if (expected.typeId() == org.apache.iceberg.types.Type.TypeID.DOUBLE) {\n            return new ParquetValueReaders.FloatAsDoubleReader(desc);\n          } else {\n            return new ParquetValueReaders.UnboxedReader<>(desc);\n          }\n        case BOOLEAN:\n        case INT64:\n        case DOUBLE:\n          return new ParquetValueReaders.UnboxedReader<>(desc);\n        default:\n          throw new UnsupportedOperationException(\"Unsupported type: \" + primitive);\n      }\n    }\n  }\n\n  private static class BinaryDecimalReader\n      extends ParquetValueReaders.PrimitiveReader<DecimalData> {\n    private final int precision;\n    private final int scale;\n\n    BinaryDecimalReader(ColumnDescriptor desc, int precision, int scale) {\n      super(desc);\n      this.precision = precision;\n      this.scale = scale;\n    }\n\n    @Override\n    public DecimalData read(DecimalData ignored) {\n      Binary binary = column.nextBinary();","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetReaders.java#L324-L360","documentation":"FlinkParquetReaders.primitive() throws UnsupportedOperationException 'Unsupported type: <primitive>' when a Parquet primitive column has no reader branch — the physical Parquet type cannot be decoded into the expected Iceberg/Flink value (terminal catch-all in the reader builder).","triggerScenarios":"Reading Parquet files whose physical column type for an Iceberg primitive is not among the handled cases (e.g. unexpected INT96 or an unsupported FIXED_LEN_BYTE_ARRAY usage).","commonSituations":"Parquet files written by external tools with nonstandard physical types; parquet-avro INT96 timestamps; schema evolution leaving old physical types.","solutions":["Identify the offending physical type from the message and rewrite the files with standard types (e.g. INT64 millis timestamps).","Re-write files with `rewrite_data_files` to normalize physical encodings.","Exclude/projection-drop the problematic column while reading.","Upgrade iceberg-flink if the type gained reader support."],"exampleFix":"// before\n// column written as INT96 timestamp\n// after\n// rewrite parquet with INT64 (TIMESTAMP_MICROS) and read again","handlingStrategy":"validation","validationCode":"// inspect physical parquet types before reading\nParquetFileReader pfr = ParquetFileReader.open(conf, path);\nMessageType schema = pfr.getFooter().getFileMetaData().getSchema();\nschema.getFields().forEach(f -> LOG.info(\"parquet field: {} {}\", f.getName(), f.asPrimitiveType()));","typeGuard":null,"tryCatchPattern":"try (CloseableIterable<RowData> rows = reader.read()) {\n  rows.forEach(out::collect);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"Unsupported type\")) {\n    throw new IOException(\"Unsupported Parquet physical type: \" + e.getMessage(), e);\n  }\n  throw e;\n}","preventionTips":["Avoid INT96 and nonstandard physical types when producing Parquet externally.","Rewrite files with iceberg rewrite actions after format changes.","Check physical types with parquet-tools before registering external files."],"tags":["flink","parquet","reader","unsupported-type"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}