apache/flink · error · UnsupportedOperationException

Unsupported type: {}

Error message

Unsupported type: {}

What it means

UnsupportedOperationException from the default branch of createVectorFromConstant in ParquetSplitReaderUtil. This utility materializes an in-memory constant column vector for a logical type (used to fill missing/all-null columns); the exhaustive switch covers primitives, timestamps, dates, etc., and any unhandled LogicalTypeRoot falls through to this throw.

Source

Thrown at flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/ParquetSplitReaderUtil.java:284

                    dv.fill(((Number) value).doubleValue());
                }
                return dv;
            case DATE:
                if (value instanceof LocalDate) {
                    value = Date.valueOf((LocalDate) value);
                }
                return createVectorFromConstant(
                        new IntType(), value == null ? null : toInternal((Date) value), batchSize);
            case TIMESTAMP_WITHOUT_TIME_ZONE:
                HeapTimestampVector tv = new HeapTimestampVector(batchSize);
                if (value == null) {
                    tv.fillWithNulls();
                } else {
                    tv.fill(TimestampData.fromLocalDateTime((LocalDateTime) value));
                }
                return tv;
            default:
                throw new UnsupportedOperationException("Unsupported type: " + type);
        }
    }

    private static List<ColumnDescriptor> getAllColumnDescriptorByType(
            int depth, Type type, List<ColumnDescriptor> columns) throws ParquetRuntimeException {
        List<ColumnDescriptor> res = new ArrayList<>();
        for (ColumnDescriptor descriptor : columns) {
            if (depth >= descriptor.getPath().length) {
                throw new InvalidSchemaException("Corrupted Parquet schema");
            }
            if (type.getName().equals(descriptor.getPath()[depth])) {
                res.add(descriptor);
            }
        }

        // If doesn't find the type descriptor in corresponding depth, throw exception
        if (res.isEmpty()) {
            throw new InvalidSchemaException(

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Ensure every projected column exists in the Parquet files so no constant/missing-column vector is needed for nested types
  2. Cast or flatten the nested/exotic column out of the projection
  3. Upgrade Flink - coverage of constant vectors for nested types has expanded over versions; check the changelog for your type
Defensive patterns

Strategy: type-guard

Type guard

static boolean supportsConstantVector(LogicalTypeRoot root) {
    return root == LogicalTypeRoot.CHAR || root == LogicalTypeRoot.VARCHAR
            || root == LogicalTypeRoot.BOOLEAN || root == LogicalTypeRoot.TINYINT
            || root == LogicalTypeRoot.SMALLINT || root == LogicalTypeRoot.INTEGER
            || root == LogicalTypeRoot.BIGINT || root == LogicalTypeRoot.FLOAT
            || root == LogicalTypeRoot.DOUBLE || root == LogicalTypeRoot.DECIMAL
            || root == LogicalTypeRoot.DATE || root == LogicalTypeRoot.TIME_WITHOUT_TIME_ZONE
            || root == LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE
            || root == LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE;
}

Try / catch

catch (UnsupportedOperationException e) { if (e.getMessage().startsWith("Unsupported type:")) { /* drop nested/exotic column from projection */ } else throw e; }

Prevention

When it happens

Trigger: createVectorFromConstant(batchSize, type, value) invoked with a logical type outside the handled set - typically structured types (ARRAY/MAP/ROW/MULTISET) or exotic roots (STRUCTURED_TYPE, SYMBOL, DISTINCT_TYPE, UNRESOLVED) when a constant vector must be built for them.

Common situations: Reading tables where a nested (array/map/row) column is missing from a file and must be filled with nulls; table schemas containing rarely used SQL types not covered by the vectorized Parquet path in that Flink version.

Related errors


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/1fc48834cec0ddd6. Report an issue: GitHub.