apache/iceberg · error · UnsupportedOperationException
UnsupportedOperationException
Error message
UnsupportedOperationException
What it means
UpdateSchema.caseSensitive(boolean) is a default method that throws an UnsupportedOperationException with no message when the implementation does not support configuring case sensitivity for column-name resolution during schema updates. It is used by EvolveSchemaVisitor and callers that need to control name matching.
Source
Thrown at api/src/main/java/org/apache/iceberg/UpdateSchema.java:660
/**
* Set the identifier fields given some field names. See {@link
* UpdateSchema#setIdentifierFields(Collection)} for more details.
*
* @param names names of the columns to set as identifier fields
* @return this for method chaining
*/
default UpdateSchema setIdentifierFields(String... names) {
return setIdentifierFields(Sets.newHashSet(names));
}
/**
* Determines if the case of schema needs to be considered when comparing column names
*
* @param caseSensitive when false case is not considered in column name comparisons.
* @return this for method chaining
*/
default UpdateSchema caseSensitive(boolean caseSensitive) {
throw new UnsupportedOperationException();
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Use the table's own updateSchema() implementation, which typically supports case sensitivity.
- Match column names using the default case convention of the implementation instead of toggling case sensitivity.
- Upgrade Iceberg if a newer version added support to your implementation class.
- Implement caseSensitive() if you own the UpdateSchema implementation.
Example fix
// before
transaction.updateSchema().caseSensitive(false).renameColumn("Name", "name");
// after
table.updateSchema().caseSensitive(false).renameColumn("Name", "name"); Defensive patterns
Strategy: try-catch
Validate before calling
// no public capability check; only call on implementations known to support case sensitivity
Type guard
boolean supportsCaseSensitivity = updateSchema.getClass().getName().startsWith("org.apache.iceberg.BaseUpdateSchema"); Try / catch
try {
updateSchema.caseSensitive(false).renameColumn("Name", "name");
} catch (UnsupportedOperationException e) {
updateSchema.renameColumn("Name", "name"); // use implementation's default name resolution
} Prevention
- Avoid caseSensitive() on transaction-scoped schema updates unless supported.
- Verify column-name casing against the implementation's default resolution rules.
- Catch UnsupportedOperationException when writing generic schema-evolution tooling.
When it happens
Trigger: Calling updateSchema.caseSensitive(true/false) on an UpdateSchema implementation that has not overridden the default method, e.g. during visitor-driven schema evolution on a path without case-sensitivity support.
Common situations: Renaming/moving columns with different casing through a transaction-scoped update; schema-evolution frameworks (EvolveSchemaVisitor) invoking the method generically on implementations lacking support.
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
- Default values are not supported
- Unknown field ordinal:
- Unknown move type:
- Cannot apply unknown unique constraint: {constraint.getType(
- Cannot drop identifier fields in non-Iceberg table: $table
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/783ca03715d23149.
Report an issue: GitHub.