{"record":{"id":"3b54d590c0eda432","repo":"apache/seatunnel","slug":"common-07-3b54d5","errorCode":"COMMON-07","errorMessage":"Unexpected value: <sqlType>","messagePattern":"Unexpected value: <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/source/QdrantSourceReader.java","lineNumber":170,"sourceCode":"                case BIGINT:\n                    fields[fieldIndex] = value.getIntegerValue();\n                    break;\n                case FLOAT:\n                case DECIMAL:\n                case DOUBLE:\n                    fields[fieldIndex] = value.getDoubleValue();\n                    break;\n                case BINARY_VECTOR:\n                case FLOAT_VECTOR:\n                case FLOAT16_VECTOR:\n                case BFLOAT16_VECTOR:\n                    List<Float> list = vector.getDataList();\n                    Float[] vectorArray = new Float[list.size()];\n                    list.toArray(vectorArray);\n                    fields[fieldIndex] = VectorUtils.toByteBuffer(vectorArray);\n                    break;\n                default:\n                    throw new QdrantConnectorException(\n                            CommonErrorCode.UNSUPPORTED_DATA_TYPE,\n                            \"Unexpected value: \" + seaTunnelDataType.getSqlType().name());\n            }\n        }\n\n        SeaTunnelRow seaTunnelRow = new SeaTunnelRow(fields);\n        seaTunnelRow.setTableId(tablePath.getFullName());\n        seaTunnelRow.setRowKind(RowKind.INSERT);\n        return seaTunnelRow;\n    }\n}\n","sourceCodeStart":152,"sourceCodeEnd":182,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-qdrant/src/main/java/org/apache/seatunnel/connectors/seatunnel/qdrant/source/QdrantSourceReader.java#L152-L182","documentation":"QdrantSourceReader.convertToSeaTunnelRow maps each retrieved Qdrant point field into the SeaTunnel row schema. The switch over SqlType handles the supported types (including VECTOR -> float buffer); any other SQL type in the declared schema hits the default branch and throws QdrantConnectorException with CommonErrorCode.UNSUPPORTED_DATA_TYPE and message 'Unexpected value: <sqlType>'.","triggerScenarios":"The declared SeaTunnel schema for the Qdrant source contains a column whose SqlType is not handled by the switch in convertToSeaTunnelRow (e.g. MAP, ARRAY, DATE), hit while converting each fetched point.","commonSituations":"Schema defined in the source config includes types Qdrant reader does not support converting (complex or temporal types); payload fields stored in Qdrant with JSON types that cannot map to the declared schema; copy-pasted schema from another connector with richer type support.","solutions":["Restrict the declared schema columns to types supported by the Qdrant reader (numeric, string, boolean, vector types)","Remove or remap unsupported columns (e.g. cast DATE to STRING, flatten MAP) before conversion","Update the connector's convertToSeaTunnelRow to handle the needed SqlType if it is a legitimate requirement","Compare the schema in the config against what buildPayload/the sink wrote to ensure round-trip type compatibility"],"exampleFix":"// before\n// schema column: create_time : DATE  -> throws 'Unexpected value: DATE'\n// after\n// schema column: create_time : STRING  (store ISO-8601 string, convert downstream)","handlingStrategy":"validation","validationCode":"// verify every declared schema column is a type the Qdrant reader supports\nSet<SqlType> supported = Set.of(SqlType.INT, SqlType.BIGINT, SqlType.DOUBLE,\n        SqlType.FLOAT, SqlType.STRING, SqlType.BOOLEAN);\nfor (SeaTunnelDataType<?> t : schema.getDataType().getFieldTypes()) {\n    if (!supported.contains(t.getSqlType())) {\n        throw new IllegalArgumentException(\n            \"Unsupported schema type for Qdrant source: \" + t.getSqlType());\n    }\n}","typeGuard":"boolean isReaderSupportedType(SeaTunnelDataType<?> t) {\n    switch (t.getSqlType()) {\n        case INT: case BIGINT: case DOUBLE: case FLOAT:\n        case STRING: case BOOLEAN:\n            return true;\n        default:\n            return false;\n    }\n}","tryCatchPattern":"try {\n    row = reader.seaTunnelRow(point);\n} catch (QdrantConnectorException e) {\n    if (e.getErrorCode() == CommonErrorCode.UNSUPPORTED_DATA_TYPE\n            && e.getMessage().startsWith(\"Unexpected value:\")) {\n        LOG.error(\"schema column type not convertible by Qdrant reader: {}\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Align the source schema with types the reader actually converts (numerics, string, boolean, vector)","Avoid DATE/TIMESTAMP/MAP/ARRAY columns in the Qdrant source schema; cast them to STRING upstream","Round-trip test: write with the sink then read back with the source using the same schema","Update convertToSeaTunnelRow if a new type is a legitimate requirement"],"tags":["qdrant","vector-database","type-mismatch","schema"],"backgroundTag":"unsupported-dtype","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"}