{"record":{"id":"939d41dd95ed4dfd","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-e","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement equalSchemes\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement equalSchemes\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java","lineNumber":123,"sourceCode":"   * @param newPrefixMismatchMode mode for handling prefix mismatches\n   * @return this for method chaining\n   */\n  default DeleteOrphanFiles prefixMismatchMode(PrefixMismatchMode newPrefixMismatchMode) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement prefixMismatchMode\");\n  }\n\n  /**\n   * Passes schemes that should be considered equal.\n   *\n   * <p>The key may include a comma-separated list of schemes. For instance, Map(\"s3a,s3,s3n\",\n   * \"s3\").\n   *\n   * @param newEqualSchemes list of equal schemes\n   * @return this for method chaining\n   */\n  default DeleteOrphanFiles equalSchemes(Map<String, String> newEqualSchemes) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement equalSchemes\");\n  }\n\n  /**\n   * Passes authorities that should be considered equal.\n   *\n   * <p>The key may include a comma-separate list of authorities. For instance, Map(\"s1name,s2name\",\n   * \"servicename\").\n   *\n   * @param newEqualAuthorities list of equal authorities\n   * @return this for method chaining\n   */\n  default DeleteOrphanFiles equalAuthorities(Map<String, String> newEqualAuthorities) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement equalAuthorities\");\n  }\n\n  /** The action result that contains a summary of the execution. */","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java#L105-L141","documentation":"equalSchemes(Map<String,String>) on DeleteOrphanFiles declares which URI schemes should be treated as equal (e.g., \"s3\" vs \"s3a\") during orphan file detection. The default method throws UnsupportedOperationException because the concrete action implementation does not support this configuration.","triggerScenarios":"Calling .equalSchemes(map) on a DeleteOrphanFiles implementation that has not overridden the method — typically older engine runtimes or custom action implementations.","commonSituations":"Normalizing scheme aliases after a storage migration (s3 vs s3a vs s3n) while on a runtime without scheme-equality support; following current documentation against an older Iceberg build.","solutions":["Upgrade the engine integration to a version implementing equalSchemes.","Drop the equalSchemes call and rely on the default scheme comparison if no aliases must be treated equal.","Override equalSchemes in a custom DeleteOrphanFiles implementation."],"exampleFix":"// before\nDeleteOrphanFiles a = action.equalSchemes(Map.of(\"s3\", \"s3a\")); // throws\n// after (upgrade, or remove configuration)\nDeleteOrphanFiles a = action; // default scheme handling","handlingStrategy":"try-catch","validationCode":"boolean ok = Arrays.stream(action.getClass().getMethods()).anyMatch(m -> \"equalSchemes\".equals(m.getName()) && m.getDeclaringClass() != DeleteOrphanFiles.class);","typeGuard":"boolean implemented = action.getClass() != DeleteOrphanFiles.class;","tryCatchPattern":"try { action = action.equalSchemes(Map.of(\"s3\", \"s3a\")); } catch (UnsupportedOperationException e) { LOG.warn(\"equalSchemes unsupported; using default comparison\"); }","preventionTips":["Upgrade before using scheme normalization features","Avoid scheme aliases in storage locations so equalSchemes is unnecessary"],"tags":["java","iceberg","unsupported-operation","uri-normalization"],"backgroundTag":"method-not-implemented","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}