{"record":{"id":"783ca03715d23149","repo":"apache/iceberg","slug":"unsupportedoperationexception","errorCode":null,"errorMessage":"UnsupportedOperationException","messagePattern":"UnsupportedOperationException","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/UpdateSchema.java","lineNumber":660,"sourceCode":"  /**\n   * Set the identifier fields given some field names. See {@link\n   * UpdateSchema#setIdentifierFields(Collection)} for more details.\n   *\n   * @param names names of the columns to set as identifier fields\n   * @return this for method chaining\n   */\n  default UpdateSchema setIdentifierFields(String... names) {\n    return setIdentifierFields(Sets.newHashSet(names));\n  }\n\n  /**\n   * Determines if the case of schema needs to be considered when comparing column names\n   *\n   * @param caseSensitive when false case is not considered in column name comparisons.\n   * @return this for method chaining\n   */\n  default UpdateSchema caseSensitive(boolean caseSensitive) {\n    throw new UnsupportedOperationException();\n  }\n}\n","sourceCodeStart":642,"sourceCodeEnd":663,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/UpdateSchema.java#L642-L663","documentation":"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.","triggerScenarios":"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.","commonSituations":"Renaming/moving columns with different casing through a transaction-scoped update; schema-evolution frameworks (EvolveSchemaVisitor) invoking the method generically on implementations lacking support.","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."],"exampleFix":"// before\ntransaction.updateSchema().caseSensitive(false).renameColumn(\"Name\", \"name\");\n\n// after\ntable.updateSchema().caseSensitive(false).renameColumn(\"Name\", \"name\");","handlingStrategy":"try-catch","validationCode":"// no public capability check; only call on implementations known to support case sensitivity","typeGuard":"boolean supportsCaseSensitivity = updateSchema.getClass().getName().startsWith(\"org.apache.iceberg.BaseUpdateSchema\");","tryCatchPattern":"try {\n  updateSchema.caseSensitive(false).renameColumn(\"Name\", \"name\");\n} catch (UnsupportedOperationException e) {\n  updateSchema.renameColumn(\"Name\", \"name\"); // use implementation's default name resolution\n}","preventionTips":["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."],"tags":["unsupported-operation","schema","case-sensitivity"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}