apache/flink · error · java.lang.IllegalArgumentException
Union types are such as 'allOf', 'anyOf' etc. and extending
Error message
Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet.
What it means
Error "Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet." thrown in apache/flink.
Source
Thrown at flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java:214
final TypeInformation<?>[] types =
convertTypes(location + '/' + ONE_OF, node.get(ONE_OF), root);
typeSet.addAll(Arrays.asList(types));
}
// use ONE_OF of reference as fallback
else if (ref.isPresent() && ref.get().has(ONE_OF) && ref.get().get(ONE_OF).isArray()) {
final TypeInformation<?>[] types =
convertTypes(
node.get(REF).asText() + '/' + ONE_OF, ref.get().get(ONE_OF), root);
typeSet.addAll(Arrays.asList(types));
}
// validate no union types or extending
if (node.has(ALL_OF)
|| node.has(ANY_OF)
|| node.has(NOT)
|| node.has(EXTENDS)
|| node.has(DISALLOW)) {
throw new IllegalArgumentException(
"Union types are such as '"
+ ALL_OF
+ "', '"
+ ANY_OF
+ "' etc. "
+ "and extending are not supported yet.");
}
// only a type (with null) is supported yet
final List<TypeInformation<?>> types = new ArrayList<>(typeSet);
if (types.size() == 0) {
throw new IllegalArgumentException("No type could be found in node:" + location);
} else if (types.size() > 2 || (types.size() == 2 && !types.contains(Types.VOID))) {
throw new IllegalArgumentException(
"Union types with more than just a null type are not supported yet.");
}
// return the first non-void type or voidView on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet.
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet.") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Union types are such as 'allOf', 'anyOf' etc. and extending are not supported yet.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/6def953f4f0abafb.
Report an issue: GitHub.