{"record":{"id":"69f1816be6e90583","repo":"apache/iceberg","slug":"unsupported-type-type-typeid","errorCode":null,"errorMessage":"Unsupported type: ${type.typeId()}","messagePattern":"Unsupported type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java","lineNumber":167,"sourceCode":"        return convertBoolean(value);\n      case STRING:\n        return convertString(value);\n      case UUID:\n        return convertUUID(value);\n      case BINARY:\n        return convertBase64Binary(value);\n      case FIXED:\n        return ByteBuffers.toByteArray(convertBase64Binary(value));\n      case DATE:\n        return convertDateValue(value);\n      case TIME:\n        return convertTimeValue(value);\n      case TIMESTAMP:\n        return convertTimestampValue(value, (TimestampType) type);\n      case VARIANT:\n        return convertVariantValue(value);\n    }\n    throw new UnsupportedOperationException(\"Unsupported type: \" + type.typeId());\n  }\n\n  protected GenericRecord convertStructValue(\n      Object value,\n      StructType schema,\n      int parentFieldId,\n      SchemaUpdate.Consumer schemaUpdateConsumer) {\n    if (value instanceof Map) {\n      return convertToStruct((Map<?, ?>) value, schema, parentFieldId, schemaUpdateConsumer);\n    } else if (value instanceof Struct) {\n      return convertToStruct((Struct) value, schema, parentFieldId, schemaUpdateConsumer);\n    }\n    throw new IllegalArgumentException(\"Cannot convert to struct: \" + value.getClass().getName());\n  }\n\n  /**\n   * This method will be called for records when there is no record schema. Also, when there is no\n   * schema, we infer that map values are struct types. This method might also be called if the","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java#L149-L185","documentation":"convertValue dispatches on the Iceberg Type's typeId to a specific conversion method (convertInt, convertString, etc.). If the field's Iceberg type has no case in the switch, it throws UnsupportedOperationException with the typeId. This guards against Iceberg types the connector does not support converting from Connect values.","triggerScenarios":"An Iceberg field whose type's typeId falls through the switch — e.g. nested/unknown type IDs not handled by the installed converter, or subclassed Type instances added in newer Iceberg versions.","commonSituations":"Running an older kafka-connect build against tables using newer Iceberg types (e.g. variant/geospatial extensions); a schema evolved in the table but the sink bundle is outdated.","solutions":["Upgrade org.apache.iceberg:iceberg-kafka-connect to a version whose RecordConverter handles the type.","Extend RecordConverter (it is extensible via protected methods) and override convertValue or add handling for the unsupported typeId.","Exclude/alter the offending column in the table schema so its typeId is one of the supported ones."],"exampleFix":"// before\n// outdated converter fails on typeId VARIANT\n// after\n// upgrade dependency:\n// implementation 'org.apache.iceberg:iceberg-kafka-connect:1.10.0' // adds VARIANT support","handlingStrategy":"validation","validationCode":"Schema tableSchema = table.schema();\ntableSchema.columns().forEach(f -> {\n  if (!SUPPORTED_TYPE_IDS.contains(f.type().typeId())) {\n    throw new IllegalStateException(\"Unsupported column type: \" + f.name() + \" -> \" + f.type());\n  }\n});","typeGuard":null,"tryCatchPattern":"try {\n  Record r = converter.convert(value, consumer);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unsupported type:\")) {\n    upgradeConverterOrSkipField(e);\n  } else throw e;\n}","preventionTips":["Keep the iceberg-kafka-connect dependency in lockstep with the Iceberg core version used to create tables.","Review table schema evolution for newly introduced types before consumers ingest them.","Pin tested Iceberg versions in your connector distribution."],"tags":["kafka-connect","unsupported-type","iceberg-schema"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}