apache/iceberg · error · UnsupportedOperationException
Unsupported split change: %s
Error message
Unsupported split change: %s
What it means
IcebergSourceSplitReader.handleSplitsChanges only supports SplitsAddition; any other SplitsChange type (e.g., Splits Removal) throws UnsupportedOperationException. The Iceberg split reader never processes split removals.
Source
Thrown at flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/reader/IcebergSourceSplitReader.java:109
}
if (currentReader.hasNext()) {
// Because Iterator#next() doesn't support checked exception,
// we need to wrap and unwrap the checked IOException with UncheckedIOException
try {
return currentReader.next();
} catch (UncheckedIOException e) {
throw e.getCause();
}
} else {
return finishSplit();
}
}
@Override
public void handleSplitsChanges(SplitsChange<IcebergSourceSplit> splitsChange) {
if (!(splitsChange instanceof SplitsAddition)) {
throw new UnsupportedOperationException(
String.format("Unsupported split change: %s", splitsChange.getClass()));
}
if (splitComparator != null) {
List<IcebergSourceSplit> newSplits = Lists.newArrayList(splitsChange.splits());
newSplits.sort(splitComparator);
LOG.info("Add {} splits to reader: {}", newSplits.size(), newSplits);
splits.addAll(newSplits);
} else {
LOG.info("Add {} splits to reader", splitsChange.splits().size());
splits.addAll(splitsChange.splits());
}
metrics.incrementAssignedSplits(splitsChange.splits().size());
metrics.incrementAssignedBytes(calculateBytes(splitsChange));
}
@Override
public void wakeUp() {View on GitHub (pinned to 86d9c8fc54)
Solutions
- Use the built-in Iceberg enumerator/reader pair; do not mix custom split-removal logic with IcebergSourceSplitReader.
- Verify enumerator and reader come from the same connector version (no mixed jars).
- If removals are required, subclass the split reader and handle the change type before delegating additions.
Example fix
// before reader.handleSplitsChanges(new SplitsRemoval<>(splits)); // after reader.handleSplitsChanges(new SplitsAddition<>(splitsToAdd));
Defensive patterns
Strategy: type-guard
Type guard
static boolean isAddition(SplitsChange<IcebergSourceSplit> change) {
return change instanceof SplitsAddition;
}
// call only if (isAddition(change)) reader.handleSplitsChanges(change); Prevention
- Only send SplitsAddition to IcebergSourceSplitReader
- Use the stock enumerator/reader pair without custom removal logic
- Keep reader and enumerator on the same connector version
When it happens
Trigger: The source reader receives a SplitsChange that is not a SplitsAddition — e.g., a SplitsRemoval produced by enumerator logic or a custom SourceReader/split assigner setup.
Common situations: Custom enumerator emitting removals; connector bug when splits are added back after failover; running with incompatible connector versions.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported split change: %s
- Unsupported split change: {splitsChange.getClass()}
- Unsupported split change: %s
- Altering schema is not supported in the old alterTable API.
- Altering partition keys is not supported yet.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cd8b213db224657c.
Report an issue: GitHub.