{"record":{"id":"29c7746751046ca8","repo":"apache/seatunnel","slug":"hugegraphconnectorerrorcode-invalid-graph-schema","errorCode":"HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA","errorMessage":"Property '%s': type BLOB with cardinality %s is not supported for reads.","messagePattern":"Property '(.+?)': type BLOB with cardinality (.+?) is not supported for reads\\.","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/HugeGraphTypeConverter.java","lineNumber":54,"sourceCode":"public final class HugeGraphTypeConverter {\n\n    private HugeGraphTypeConverter() {}\n\n    /**\n     * Maps a HugeGraph property type + cardinality to a SeaTunnel type. A {@code LIST}/{@code SET}\n     * cardinality becomes {@code array<element>}; {@code SINGLE} (or null) stays scalar. The {@code\n     * propertyName} is used only to make any error message point at the offending column.\n     */\n    public static SeaTunnelDataType<?> toSeaTunnelType(\n            DataType dataType, Cardinality cardinality, String propertyName) {\n        SeaTunnelDataType<?> scalar = toSeaTunnelScalarType(dataType, propertyName);\n        if (cardinality == null || cardinality == Cardinality.SINGLE) {\n            return scalar;\n        }\n        // BLOB elements would produce byte[][], which downstream SeaTunnel operators do not\n        // uniformly handle — reject with a clear message rather than a mysterious CCE later.\n        if (dataType == DataType.BLOB) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA,\n                    String.format(\n                            \"Property '%s': type BLOB with cardinality %s is not supported for reads.\",\n                            propertyName, cardinality));\n        }\n        return ArrayType.of(scalar);\n    }\n\n    public static SeaTunnelDataType<?> toSeaTunnelScalarType(\n            DataType dataType, String propertyName) {\n        switch (dataType) {\n            case TEXT:\n                return BasicType.STRING_TYPE;\n            case BYTE:\n                return BasicType.BYTE_TYPE;\n            case INT:\n                return BasicType.INT_TYPE;\n            case LONG:","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/HugeGraphTypeConverter.java#L36-L72","documentation":"HugeGraphTypeConverter.toSeaTunnelType converts HugeGraph property types (with cardinality) to SeaTunnel types. A BLOB property with a non-SINGLE cardinality (e.g. LIST/SET of blobs) would map to byte[][], which SeaTunnel operators do not uniformly handle, so the connector rejects the schema up front with a clear INVALID_GRAPH_SCHEMA error instead of failing later with a ClassCastException.","triggerScenarios":"A source read against a vertex/edge label whose schema contains a PropertyKey of DataType BLOB with cardinality LIST or SET; the error fires while building the SeaTunnel catalog table from the HugeGraph schema.","commonSituations":"HugeGraph graph was modeled with list-of-bytes properties (e.g. embedded binary attachments, serialized blobs stored as LIST<BLOB>) and SeaTunnel tries to read that label.","solutions":["Change the property cardinality to SINGLE in HugeGraph if the data allows it (BLOB+SINGLE maps to byte[] and is supported).","Exclude the BLOB multi-cardinality property from the read (adjust the field/property selection for the source).","Pre-transform the data in HugeGraph to a supported representation (e.g. store base64 TEXT in a LIST).","If you control the model, split the blob list into separate SINGLE properties or a different label."],"exampleFix":"// before (HugeGraph schema)\nschema.propertyKey(\"attachments\").asBlob().cardinalityList().create();\n// after\nschema.propertyKey(\"attachment\").asBlob().cardinalitySingle().create();\n// or store as text list:\nschema.propertyKey(\"attachments\").asText().cardinalityList().create();","handlingStrategy":"validation","validationCode":"// Before reading, inspect the HugeGraph schema for multi-cardinality BLOB properties\nfor (PropertyKey pk : schema.getPropertyKeys()) {\n  if (pk.dataType() == DataType.BLOB && pk.cardinality() != Cardinality.SINGLE) {\n    throw new IllegalStateException(\n      \"Property \" + pk.name() + \" is multi-cardinality BLOB; exclude it from the read\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  readLabel(label);\n} catch (HugeGraphConnectorException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"BLOB with cardinality\")) {\n    // adjust field selection to skip the offending property\n  }\n  throw e;\n}","preventionTips":["Model multi-valued data as TEXT instead of LIST<BLOB> when downstream readers exist","Check HugeGraph schema before designing SeaTunnel field lists","Keep BLOB properties SINGLE cardinality if byte[] is acceptable","Document graph schema constraints for sink/source authors"],"tags":["hugegraph","schema","blob","type-conversion"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}