{"record":{"id":"dc499d3bcf5e49c6","repo":"apache/seatunnel","slug":"unsupport-elementsqltype-array","errorCode":null,"errorMessage":"Unsupport <elementSqlType> ARRAY","messagePattern":"Unsupport <elementSqlType> ARRAY","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbTypeConverter.java","lineNumber":433,"sourceCode":"                // YashanDB does not have a native ARRAY column type, store as vector\n                if (SUPPORT_FLOAT32_VECTOR.contains(\n                        ((ArrayType) column.getDataType()).getElementType().getSqlType())) {\n                    log.warn(\n                            \"The column {} with type ARRAY will be converted to VECTOR in YashanDB\",\n                            column.getName());\n                    builder.columnType(\n                            String.format(\"%s(%s,FLOAT32)\", VECTOR_NAME, column.getColumnLength()));\n                    builder.dataType(VECTOR_NAME);\n                } else if (SUPPORT_FLOAT64_VECTOR.contains(\n                        ((ArrayType) column.getDataType()).getElementType().getSqlType())) {\n                    log.warn(\n                            \"The column {} with type ARRAY will be converted to VECTOR in YashanDB\",\n                            column.getName());\n                    builder.columnType(\n                            String.format(\"%s(%s,FLOAT64)\", VECTOR_NAME, column.getColumnLength()));\n                    builder.dataType(VECTOR_NAME);\n                } else {\n                    throw new UnsupportedOperationException(\n                            \"Unsupport \"\n                                    + ((ArrayType) column.getDataType())\n                                            .getElementType()\n                                            .getSqlType()\n                                    + \" ARRAY\");\n                }\n                break;\n            case FLOAT_VECTOR:\n            case FLOAT16_VECTOR:\n                builder.columnType(String.format(\"%s(%s)\", VECTOR_NAME, column.getScale()));\n                builder.dataType(VECTOR_NAME);\n                break;\n            case BFLOAT16_VECTOR:\n                // Vector types are stored as VECTOR in YashanDB\n                log.warn(\n                        \"The column {} with type {} will be converted to VECTOR in YashanDB\",\n                        column.getName(),\n                        column.getDataType().getSqlType().name());","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbTypeConverter.java#L415-L451","documentation":"YashanDbTypeConverter.reconvert() supports converting SeaTunnel ARRAY columns to YashanDB VECTOR only when the element SQL type is FLOAT64 (double). An ARRAY with any other element type (e.g. INT or STRING arrays) has no YashanDB equivalent mapping, so UnsupportedOperationException is thrown naming the element SQL type.","triggerScenarios":"A table-creation/schema-conversion path encounters a SeaTunnel column of type ArrayType whose element getSqlType() is not FLOAT64 while the target is YashanDB — e.g. ARRAY<INT32> or ARRAY<STRING> in a source being auto-mapped to a YashanDB sink.","commonSituations":"Source tables (e.g. PostgreSQL int[] or text[] columns) being replicated to YashanDB; users expecting array passthrough on a dialect that only vectorizes FLOAT64 arrays.","solutions":["Change the source column element type to FLOAT64/FLOAT if the intent is a vector (e.g. cast int[] to double[])","Pre-convert non-float arrays to a supported representation (e.g. JSON string) before the YashanDB sink","Create the YashanDB target table manually with an appropriate column type instead of relying on auto-conversion","Request/patch YashanDbTypeConverter to map additional ARRAY element types"],"exampleFix":"// before\ncolumn dataType: ArrayType(INT32) -> throws\n// after\n// transform: map elements to double so column is ArrayType(FLOAT64)\n// or declare source column as ARRAY<FLOAT64> / VECTOR","handlingStrategy":"validation","validationCode":"if (col.getDataType() instanceof ArrayType\n    && ((ArrayType) col.getDataType()).getElementType().getSqlType() != SqlType.FLOAT64) {\n    throw new IllegalArgumentException(\"YashanDB sink only supports FLOAT64-element arrays\");\n}","typeGuard":"boolean yashanCompatibleArray(SeaTunnelColumn c) {\n    return !(c.getDataType() instanceof ArrayType)\n        || ((ArrayType) c.getDataType()).getElementType().getSqlType() == SqlType.FLOAT64;\n}","tryCatchPattern":"try {\n    converter.toConnectorType(column, builder);\n} catch (UnsupportedOperationException e) {\n    if (e.getMessage().endsWith(\"ARRAY\")) { fallbackToManualDdl(column); }\n    else throw e;\n}","preventionTips":["Cast non-float array sources (int[], text[]) to float arrays or strings upstream","Pre-create YashanDB target tables with explicit types instead of relying on auto DDL","Review YashanDbTypeConverter's supported mappings before designing source schemas"],"tags":["jdbc","yashandb","type-conversion","array"],"backgroundTag":"incompatible-source-type","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"}