apache/seatunnel · warning

The column with type ARRAY will be converted to VECTOR in…

Error message

The column {} with type ARRAY will be converted to VECTOR in YashanDB

What it means

Warning from YashanDbTypeConverter.reconvert: YashanDB has no native ARRAY type, so ARRAY columns whose element type is in SUPPORT_FLOAT32_VECTOR are converted to a FLOAT32 VECTOR column of the given length. Data shape must be a fixed-length float vector or it will not round-trip as expected.

Solutions

  1. Ensure array element values fit the declared vector length (getColumnLength) before writing.
  2. If a true array is required, serialize to a string/JSON column via a Transform instead of relying on the VECTOR mapping.
  3. Keep element types within FLOAT32-supported ranges to preserve numeric fidelity.

Example fix

// before: source column embedding array<float>
// after (keep array semantics)
Transform: MAP(embedding, CAST(x AS STRING)) -> concat to JSON string column
Defensive patterns

Strategy: validation

Validate before calling

if (col.getDataType() instanceof ArrayType
        && SUPPORT_FLOAT32_VECTOR.contains(((ArrayType) col.getDataType()).getElementType().getSqlType())) {
    assert values.size() <= col.getColumnLength(); // vector length check
}

Type guard

boolean mapsToFloat32Vector(ArrayType a) { return SUPPORT_FLOAT32_VECTOR.contains(a.getElementType().getSqlType()); }

Prevention

When it happens

Trigger: Catalog sink write/auto table creation in YashanDB for an ARRAY column with FLOAT32-compatible element type (e.g. array<float> / array<int32>), column length taken from getColumnLength().

Common situations: Embedding/ML pipelines storing float vectors as arrays in the source (PostgreSQL float4[], SeaTunnel array<float>) synced into YashanDB vector columns.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/96535cefd3852b4f. 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:418

                            decimalType.getScale(),
                            MAX_SCALE,
                            precision,
                            scale);
                }
                builder.columnType(String.format("%s(%s,%s)", NUMBER, precision, scale));
                builder.dataType(NUMBER);
                builder.precision(precision);
                builder.scale(scale);
                break;
            case BYTES:
                builder.columnType(BLOB);
                builder.dataType(BLOB);
                break;
            case ARRAY:
                // 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()

View on GitHub (pinned to cf67b549a7)