apache/flink · error · RuntimeException
The quality of field type is incompatible with the request s
Error message
The quality of field type is incompatible with the request schema!
What it means
RuntimeException from checkSchema() in ParquetColumnarRowSplitReader: the number of clipped types (selectedTypes, produced by clipping the requested fields against the file schema) does not equal the requested schema's field count. It signals an internal inconsistency between the requested schema that was built (Types.buildMessage().addFields(types)) and the requestedSchema message, typically caused by duplicate requested field names or an unsupported nested-type clipping (the code carries a 'TODO clip for array,map,row types').
Source
Thrown at flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/ParquetColumnarRowSplitReader.java:230
/**
* Create readable vectors from writable vectors. Especially for decimal, see {@link
* ParquetDecimalVector}.
*/
private ColumnVector[] createReadableVectors() {
ColumnVector[] vectors = new ColumnVector[writableVectors.length];
for (int i = 0; i < writableVectors.length; i++) {
vectors[i] =
selectedTypes[i].getTypeRoot() == LogicalTypeRoot.DECIMAL
? new ParquetDecimalVector(writableVectors[i])
: writableVectors[i];
}
return vectors;
}
private void checkSchema() throws IOException, UnsupportedOperationException {
if (selectedTypes.length != requestedSchema.getFieldCount()) {
throw new RuntimeException(
"The quality of field type is incompatible with the request schema!");
}
/*
* Check that the requested schema is supported.
*/
for (int i = 0; i < requestedSchema.getFieldCount(); ++i) {
String[] colPath = requestedSchema.getPaths().get(i);
if (fileSchema.containsPath(colPath)) {
ColumnDescriptor fd = fileSchema.getColumnDescription(colPath);
if (!fd.equals(requestedSchema.getColumns().get(i))) {
throw new UnsupportedOperationException("Schema evolution not supported.");
}
} else {
if (requestedSchema.getColumns().get(i).getMaxDefinitionLevel() == 0) {
// Column is missing in data but the required data is non-nullable. This file is
// invalid.
throw new IOException(View on GitHub (pinned to 2f3c205e92)
Solutions
- Remove duplicate columns (exact or case-insensitive) from the requested schema/projection
- If the file has case-duplicate columns, normalize them first (see the case-insensitive duplicate-key error)
- Upgrade Flink - nested type clipping for array/map/row has been progressively fixed; pick a version where your nested schema is supported
- Flatten or simplify nested row/array/map columns in the source files if the version cannot clip them
Defensive patterns
Strategy: validation
Validate before calling
// before building the reader, assert the requested projection has unique names
Set<String> low = new HashSet<>();
for (String f : fieldNames) { if (!low.add(f.toLowerCase(Locale.ROOT))) throw new IllegalStateException("Duplicate requested field: " + f); }
assert fieldNames.length == selectedTypes.length; Prevention
- Never define tables with case-duplicate column names
- Test nested array/map/row projections against your Flink version before production
When it happens
Trigger: Constructing ParquetColumnarRowSplitReader where requestedSchema (built from the types[] array) ends up with a different field count than selectedTypes.length - e.g. requested fields that collapse to the same physical column, or nested array/map/row types that the clip logic does not fully expand.
Common situations: Tables with duplicate column names after case folding in the requested projection; reading deeply nested array/map/row columns in older Flink versions where clipping of nested types was incomplete; mixed schemas where some requested fields resolve and others do not.
Related errors
- Parquet with case insensitive mode should have no duplicate
- Corrupted Parquet schema
- Failed to find related Parquet column descriptor with type {
- Unknown ColumnIO, %s
- Can not find column io for parquet reader.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/fbca5ce86e39b039.
Report an issue: GitHub.