{"record":{"id":"caae942e98af3a74","repo":"apache/seatunnel","slug":"invalid-graph-schema-caae94","errorCode":"INVALID_GRAPH_SCHEMA","errorMessage":"Unsupported cardinality: '%s'","messagePattern":"Unsupported cardinality: '(.+?)'","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/DataTypeUtil.java","lineNumber":114,"sourceCode":"        DataType dataType = propertyKey.dataType();\n        Cardinality cardinality = propertyKey.cardinality();\n        switch (cardinality) {\n            case SINGLE:\n                return parseSingleValue(\n                        key, value, dataType, dateFormat, timeZone, extraDateFormats);\n            case SET:\n            case LIST:\n                return parseMultiValues(\n                        key,\n                        value,\n                        dataType,\n                        cardinality,\n                        dateFormat,\n                        timeZone,\n                        extraDateFormats,\n                        listFormat);\n            default:\n                throw new HugeGraphConnectorException(\n                        HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA,\n                        String.format(\"Unsupported cardinality: '%s'\", cardinality));\n        }\n    }\n\n    /**\n     * collection format: \"obj1,obj2,...,obj_n\" or \"[obj1,obj2,...,obj_n]\" ..etc TODO: After parsing\n     * to json, the order of the collection changed in some cases (such as list<date>)\n     */\n    private static Object parseMultiValues(\n            String key,\n            Object values,\n            DataType dataType,\n            Cardinality cardinality,\n            String dateFormat,\n            String timeZone,\n            List<String> extraDateFormats,\n            ListFormat listFormat) {","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/DataTypeUtil.java#L96-L132","documentation":"DataTypeUtil.convert maps HugeGraph property cardinality values to SeaTunnel list/array types. When the schema declares a cardinality outside the supported set (single, list, set), the default branch throws INVALID_GRAPH_SCHEMA with this message.","triggerScenarios":"A HugeGraph property key schema uses an unexpected/unknown cardinality value, and the connector calls DataTypeUtil.convert (via convert) to map the schema type during read setup.","commonSituations":"Schema created directly against the HugeGraph API with a cardinality the connector does not recognize, or a schema modified/added in a newer HugeGraph version not yet mapped by the connector.","solutions":["Check the property key's cardinality with HugeGraph's schema API and set it to one of single, list, or set.","If the cardinality is valid but unmapped, upgrade the SeaTunnel hugegraph connector or open an issue to add support.","Recreate the property key with a supported cardinality (HugeGraph does not allow changing cardinality in place)."],"exampleFix":"// before\nschema.propertyKey(\"tags\").cardinality(Cardinality.OTHER).valueText().create();\n// after\nschema.propertyKey(\"tags\").cardinality(Cardinality.LIST).valueText().create();","handlingStrategy":"validation","validationCode":"// before ingest: verify cardinality of each property key\nSet<String> allowed = Set.of(\"SINGLE\", \"LIST\", \"SET\");\nfor (PropertyKey pk : schema().getPropertyKeys()) {\n    if (!allowed.contains(pk.cardinality().name())) {\n        throw new IllegalArgumentException(\"Unsupported cardinality on \" + pk.name());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    SeaTunnelRow row = converter.convert(hugeGraphVertex);\n} catch (HugeGraphConnectorException e) {\n    if (e.getCode() == INVALID_GRAPH_SCHEMA && e.getMessage().contains(\"Unsupported cardinality\")) {\n        LOG.error(\"Fix property key cardinality in HugeGraph schema: {}\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Only declare property keys with SINGLE, LIST, or SET cardinality in schemas the connector reads.","Dump and review the graph schema before wiring a new connector config.","Recreate (not mutate) property keys when changing cardinality.","Pin connector and HugeGraph versions known to be schema-compatible."],"tags":["hugegraph","schema","cardinality"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}