apache/seatunnel · error · UnsupportedOperationException

Unsupport ARRAY

Error message

Unsupport <elementSqlType> ARRAY

What it means

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.

Solutions

  1. Change the source column element type to FLOAT64/FLOAT if the intent is a vector (e.g. cast int[] to double[])
  2. Pre-convert non-float arrays to a supported representation (e.g. JSON string) before the YashanDB sink
  3. Create the YashanDB target table manually with an appropriate column type instead of relying on auto-conversion
  4. Request/patch YashanDbTypeConverter to map additional ARRAY element types

Example fix

// before
column dataType: ArrayType(INT32) -> throws
// after
// transform: map elements to double so column is ArrayType(FLOAT64)
// or declare source column as ARRAY<FLOAT64> / VECTOR
Defensive patterns

Strategy: validation

Validate before calling

if (col.getDataType() instanceof ArrayType
    && ((ArrayType) col.getDataType()).getElementType().getSqlType() != SqlType.FLOAT64) {
    throw new IllegalArgumentException("YashanDB sink only supports FLOAT64-element arrays");
}

Type guard

boolean yashanCompatibleArray(SeaTunnelColumn c) {
    return !(c.getDataType() instanceof ArrayType)
        || ((ArrayType) c.getDataType()).getElementType().getSqlType() == SqlType.FLOAT64;
}

Try / catch

try {
    converter.toConnectorType(column, builder);
} catch (UnsupportedOperationException e) {
    if (e.getMessage().endsWith("ARRAY")) { fallbackToManualDdl(column); }
    else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/dc499d3bcf5e49c6. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbTypeConverter.java:433

                // YashanDB does not have a native ARRAY column type, store as vector
                if (SUPPORT_FLOAT32_VECTOR.contains(
                        ((ArrayType) column.getDataType()).getElementType().getSqlType())) {
                    log.warn(
                            "The column {} with type ARRAY will be converted to VECTOR in YashanDB",
                            column.getName());
                    builder.columnType(
                            String.format("%s(%s,FLOAT32)", VECTOR_NAME, column.getColumnLength()));
                    builder.dataType(VECTOR_NAME);
                } else if (SUPPORT_FLOAT64_VECTOR.contains(
                        ((ArrayType) column.getDataType()).getElementType().getSqlType())) {
                    log.warn(
                            "The column {} with type ARRAY will be converted to VECTOR in YashanDB",
                            column.getName());
                    builder.columnType(
                            String.format("%s(%s,FLOAT64)", VECTOR_NAME, column.getColumnLength()));
                    builder.dataType(VECTOR_NAME);
                } else {
                    throw new UnsupportedOperationException(
                            "Unsupport "
                                    + ((ArrayType) column.getDataType())
                                            .getElementType()
                                            .getSqlType()
                                    + " ARRAY");
                }
                break;
            case FLOAT_VECTOR:
            case FLOAT16_VECTOR:
                builder.columnType(String.format("%s(%s)", VECTOR_NAME, column.getScale()));
                builder.dataType(VECTOR_NAME);
                break;
            case BFLOAT16_VECTOR:
                // Vector types are stored as VECTOR in YashanDB
                log.warn(
                        "The column {} with type {} will be converted to VECTOR in YashanDB",
                        column.getName(),
                        column.getDataType().getSqlType().name());

View on GitHub (pinned to cf67b549a7)