{"record":{"id":"c67f03e9d2f85a71","repo":"apache/seatunnel","slug":"common-17","errorCode":"COMMON-17","errorMessage":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.","messagePattern":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java","lineNumber":153,"sourceCode":"            String catalogName, TablePath tablePath, TableSchema tableSchema) {\n        TableIdentifier tableIdentifier = TableIdentifier.of(catalogName, tablePath);\n        // Build catalog table\n        return CatalogTable.of(\n                tableIdentifier,\n                tableSchema,\n                new HashMap<>(),\n                new ArrayList<>(),\n                null,\n                catalogName);\n    }\n\n    /** Parse a column node from Gravitino JSON. */\n    private Column parseColumn(JsonNode columnNode) {\n        String name = getTextValue(columnNode, NAME);\n        boolean nullable = columnNode.has(NULLABLE) && columnNode.get(NULLABLE).asBoolean();\n        JsonNode typeNode = columnNode.get(TYPE);\n        if (typeNode == null) {\n            throw CommonError.convertToSeaTunnelTypeError(\n                    MetaLakeType.GRAVITINO.getType(), \"null\", name);\n        }\n        SeaTunnelDataType<?> dataType = convertGravitinoType(name, typeNode);\n        // Extract column length and scale from type string\n        // Returns null if the type doesn't support length/scale specification\n        Long columnLength = null;\n        Integer scale = null;\n        if (typeNode.isTextual()) {\n            Pair<Long, Integer> result = extractLengthAndScale(typeNode.asText());\n            if (result != null) {\n                columnLength = result.getLeft();\n                scale = result.getRight();\n            }\n        }\n        return PhysicalColumn.builder()\n                .name(name)\n                .dataType(dataType)\n                .columnLength(columnLength)","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java#L135-L171","documentation":"GravitinoTableSchemaConvertor.parseColumn() converts a Gravitino column JSON node into a SeaTunnel column. When the column's type node is missing (null), it throws CommonError.convertToSeaTunnelTypeError (code COMMON-17), embedding the metalake identifier, the offending type (\"null\"), and the field name, because a column without a type cannot be mapped to a SeaTunnel data type.","triggerScenarios":"Parsing Gravitino table schema JSON where a column object lacks the \"type\" field (columnNode.get(TYPE) == null) — e.g. hand-edited or partially exported Gravitino metadata served to the convertor.","commonSituations":"Gravitino metadata exported by tools that omit type for computed/placeholder columns; corrupted or manually edited JSON catalogs; schema snapshots produced by older Gravitino versions with different serialization.","solutions":["Fix the Gravitino metadata so every column includes a valid \"type\" field","Re-export the schema from Gravitino instead of using the hand-modified JSON","Check the Gravitino server version and upgrade if its JSON schema output is incomplete","Skip or default the offending column before feeding the JSON to the convertor"],"exampleFix":"// before\n{\"name\": \"amount\", \"nullable\": true}\n// after\n{\"name\": \"amount\", \"nullable\": true, \"type\": \"double\"}","handlingStrategy":"validation","validationCode":"for col in schemaJson.get(\"columns\", []):\n    if not col.get(\"type\"):\n        raise IllegalArgumentException(\"Column '\" + col.get(\"name\") + \"' is missing 'type'\")","typeGuard":"boolean hasType(JsonNode columnNode) {\n    return columnNode != null && columnNode.hasNonNull(\"type\");\n}","tryCatchPattern":"try {\n    Column column = convertor.convertor(schemaJson);\n} catch (CommonError e) {\n    if (\"COMMON-17\".equals(e.getErrorCode())) {\n        log.error(\"Unsupported/missing Gravitino column type: {}\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Validate Gravitino-exported JSON against a schema that requires non-null column types","Re-export metadata from the live Gravitino catalog instead of editing JSON by hand","Pin and test against the Gravitino server version your convertor targets"],"tags":["java","gravitino","schema","type-conversion"],"backgroundTag":"schema-validation-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}