apache/flink · error · java.lang.IllegalArgumentException
Union types with more than just a null type are not supporte
Error message
Union types with more than just a null type are not supported yet.
What it means
Error "Union types with more than just a null type 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:228
|| 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 void
if (types.size() == 2 && types.get(0) == Types.VOID) {
return types.get(1);
} else {
return types.get(0);
}
}
private static TypeInformation<Row> convertObject(
String location, JsonNode node, JsonNode root) {
// validate properties
if (!node.has(PROPERTIES)) {
return Types.ROW();
}
if (!node.isObject()) {View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Union types with more than just a null type 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 with more than just a null type are not supported yet.") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Union types with more than just a null type 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 with more than just a null type are not supported yet.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/38bc4668acdb3d68.
Report an issue: GitHub.