{"record":{"id":"8c20f6df18c2fcd3","repo":"apache/iceberg","slug":"invalid-iceberg-type-s-corresponding-to-orc-type","errorCode":null,"errorMessage":"Invalid iceberg type %s corresponding to ORC type %s","messagePattern":"Invalid iceberg type (.+?) corresponding to ORC type (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/data/FlinkOrcReader.java","lineNumber":132,"sourceCode":"          }\n        case TIMESTAMP_NANO:\n          Types.TimestampNanoType timestampNanoType = (Types.TimestampNanoType) iPrimitive;\n          if (timestampNanoType.shouldAdjustToUTC()) {\n            return FlinkOrcReaders.timestampTzs();\n          } else {\n            return FlinkOrcReaders.timestamps();\n          }\n        case STRING:\n          return FlinkOrcReaders.strings();\n        case UUID:\n        case FIXED:\n        case BINARY:\n          return OrcValueReaders.bytes();\n        case DECIMAL:\n          Types.DecimalType decimalType = (Types.DecimalType) iPrimitive;\n          return FlinkOrcReaders.decimals(decimalType.precision(), decimalType.scale());\n        default:\n          throw new IllegalArgumentException(\n              String.format(\n                  \"Invalid iceberg type %s corresponding to ORC type %s\", iPrimitive, primitive));\n      }\n    }\n  }\n}\n","sourceCodeStart":114,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/data/FlinkOrcReader.java#L114-L139","documentation":"FlinkOrcReader maps Iceberg primitive types to ORC value readers. When an Iceberg primitive has no ORC reader implementation in the switch, it throws IllegalArgumentException 'Invalid iceberg type %s corresponding to ORC type %s', naming both the Iceberg type and the ORC type it failed to map.","triggerScenarios":"Reading ORC data files whose Iceberg schema contains a primitive the ORC reader path does not support.","commonSituations":"Tables written by newer Iceberg versions with types unsupported by the pinned Flink ORC integration; version skew between modules; unusual column types in ORC-backed tables.","solutions":["Upgrade iceberg-flink to a version supporting the type","Exclude the unsupported column from the projection (select only supported columns)","Convert the table's data files to a format (e.g. Parquet) that supports the type"],"exampleFix":"// before\nscan.select(\"nano_ts_col\") on ORC files -> throws\n// after\nscan.select(\"supported_cols_only\") or upgrade the connector","handlingStrategy":"validation","validationCode":"schema.columns().forEach(f -> { if (f.type().isPrimitiveType()) checkOrcReaderSupported(f.type().asPrimitiveType()); });","typeGuard":null,"tryCatchPattern":"try { read(scan); } catch (IllegalArgumentException e) { LOG.error(\"ORC read failed: {}\", e.getMessage()); throw e; }","preventionTips":["Keep connector versions current","Restrict projections to supported columns","Prefer Parquet for newer type features"],"tags":["flink","orc","type-conversion"],"backgroundTag":"incompatible-source-type","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"}