apache/iceberg · error · UnsupportedOperationException
Unsupported split change: %s
Error message
Unsupported split change: %s
What it means
IcebergSourceSplitReader only supports SplitsAddition when receiving split changes from the Flink Source framework. Any other SplitsChange type (e.g. SplitsRemoval) throws UnsupportedOperationException because the reader does not implement split removal semantics.
Source
Thrown at flink/v2.2/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
- Upgrade the Iceberg Flink connector to a version whose split reader handles the change type
- Ensure a custom enumerator only emits SplitsAddition to this reader
- Check Flink version compatibility with the connector version
- File/inspect an Iceberg issue if removals come from the stock enumerator
Example fix
// before (custom enumerator) enumeratorContext.sendSplitRequest(); // ensure only additions are sent: context.signalNoMoreElement(); // avoid emitting SplitsRemoval // after: use stock IcebergEnumerator which only adds splits
Defensive patterns
Strategy: try-catch
Validate before calling
// guard before delivering changes to the reader
if (!(change instanceof SplitsAddition)) {
throw new IllegalArgumentException("Iceberg split reader only accepts SplitsAddition, got: " + change.getClass());
} Type guard
static boolean isSupportedChange(SplitsChange<IcebergSourceSplit> c) {
return c instanceof SplitsAddition;
} Try / catch
try {
splitReader.handleSplitsChanges(change);
} catch (UnsupportedOperationException e) {
LOG.error("Split reader cannot handle {} — check enumerator only emits additions", change.getClass(), e);
throw e; // do not swallow; reader state would diverge from enumerator
} Prevention
- Use the stock IcebergEnumerator, which only emits SplitsAddition
- If writing a custom enumerator, never emit SplitsRemoval/SplitsReplacement toward this reader
- Keep Flink and Iceberg connector versions compatible
When it happens
Trigger: The Flink source reader framework delivers a SplitsRemoval or other non-addition SplitsChange to handleSplitsChanges — typically when the enumerator emits removals (e.g. due to rescaling or split assignment changes).
Common situations: Custom enumerator implementations emitting removals; Flink rescaling with custom split handling; framework behavior changes across Flink versions triggering removal events the reader cannot handle.
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/e54718e4a1f3dd24.
Report an issue: GitHub.