{"record":{"id":"c4dfad9ca1f6032b","repo":"apache/seatunnel","slug":"common-07","errorCode":"COMMON-07","errorMessage":"Unexpected value type for point ID: <sqlType>","messagePattern":"Unexpected value type for point ID: <sqlType>","errorType":"error_code","errorClass":"QdrantConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-qdrant/src/main/java/org/apache/seatunnel/connectors/seatunnel/qdrant/sink/QdrantBatchWriter.java","lineNumber":150,"sourceCode":"                            Points.UpsertPoints.newBuilder()\n                                    .setCollectionName(collectionName)\n                                    .addAllPoints(qdrantDataCache)\n                                    .build())\n                    .get();\n        } catch (InterruptedException | ExecutionException e) {\n            throw new RuntimeException(\"Upsert failed\", e);\n        }\n    }\n\n    public static Points.PointId pointId(SeaTunnelDataType<?> fieldType, Object value) {\n        SqlType sqlType = fieldType.getSqlType();\n        switch (sqlType) {\n            case INT:\n                return id(Integer.parseInt(value.toString()));\n            case STRING:\n                return id(UUID.fromString(value.toString()));\n            default:\n                throw new QdrantConnectorException(\n                        CommonErrorCode.UNSUPPORTED_DATA_TYPE,\n                        \"Unexpected value type for point ID: \" + sqlType.name());\n        }\n    }\n\n    public static JsonWithInt.Value buildPayload(SeaTunnelDataType<?> fieldType, Object value) {\n        SqlType sqlType = fieldType.getSqlType();\n        switch (sqlType) {\n            case SMALLINT:\n            case INT:\n            case BIGINT:\n                return ValueFactory.value(Integer.parseInt(value.toString()));\n            case FLOAT:\n            case DOUBLE:\n                return ValueFactory.value(Long.parseLong(value.toString()));\n            case STRING:\n            case DATE:\n                return ValueFactory.value(value.toString());","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-qdrant/src/main/java/org/apache/seatunnel/connectors/seatunnel/qdrant/sink/QdrantBatchWriter.java#L132-L168","documentation":"Qdrant point IDs can only be an unsigned integer or a UUID string. QdrantBatchWriter.pointId maps the SeaTunnel SQL type of the id column: INT is parsed as an integer ID and STRING as a UUID; any other SQL type (DOUBLE, BOOLEAN, DATE, etc.) throws QdrantConnectorException with CommonErrorCode.UNSUPPORTED_DATA_TYPE. Called by buildPoint when constructing each document.","triggerScenarios":"The connector's id field is configured with a SQL type other than INT or STRING (e.g. BIGINT, DOUBLE, BOOLEAN), so the switch default fires in pointId during buildPoint.","commonSituations":"Source data has a numeric id stored as BIGINT/LONG or DECIMAL instead of INT; id column is a date/timestamp; schema mismatch between the configured schema and actual id values.","solutions":["Cast or remap the id column to INT or STRING in an upstream transform before the Qdrant sink","If ids are large integers, convert them to STRING and use UUID-format values (or a hash) since Qdrant requires u64 or UUID","Fix the declared schema so the id field is typed as int or string","Add a validation/pre-transform step rejecting rows whose id is not convertible to int or UUID"],"exampleFix":"// before\n// schema declares id as BIGINT -> pointId throws UNSUPPORTED_DATA_TYPE\n// after\n// transform id to STRING (UUID) before the sink, e.g. in SQL/transform:\n// CAST(id AS STRING)  -- or generate UUID.fromString(hash) in a custom transform","handlingStrategy":"validation","validationCode":"// check id column type before sink\nSqlType idType = idFieldType.getSqlType();\nif (idType != SqlType.INT && idType != SqlType.STRING) {\n    throw new IllegalArgumentException(\n        \"Qdrant point id must be INT or STRING, got: \" + idType);\n}\nif (idType == SqlType.STRING) {\n    UUID.fromString(idValue.toString()); // must be a valid UUID\n}","typeGuard":"boolean isValidQdrantIdType(SeaTunnelDataType<?> t) {\n    return t.getSqlType() == SqlType.INT || t.getSqlType() == SqlType.STRING;\n}","tryCatchPattern":"try {\n    sink.write(row);\n} catch (QdrantConnectorException e) {\n    if (e.getErrorCode() == CommonErrorCode.UNSUPPORTED_DATA_TYPE\n            && e.getMessage().startsWith(\"Unexpected value type for point ID\")) {\n        // fix schema/transform id column to INT or UUID STRING\n    }\n    throw e;\n}","preventionTips":["Declare the id field as int or string in the source schema","Convert BIGINT/LONG ids to STRING (UUID or u64-compatible) before the sink","Validate a sample row's id parses as int or UUID during pipeline dry-run","Keep sink schema in sync with upstream transform output types"],"tags":["qdrant","vector-database","type-mismatch","point-id"],"backgroundTag":"type-mismatch","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"}