{"record":{"id":"e056deb194ffd2c5","repo":"apache/iceberg","slug":"backup-table-name-cannot-be-specified","errorCode":null,"errorMessage":"Backup table name cannot be specified","messagePattern":"Backup table name cannot be specified","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/MigrateTable.java","lineNumber":61,"sourceCode":"  MigrateTable tableProperty(String name, String value);\n\n  /**\n   * Drops the backup of the original table after a successful migration\n   *\n   * @return this for method chaining\n   */\n  default MigrateTable dropBackup() {\n    throw new UnsupportedOperationException(\"Dropping a backup is not supported\");\n  }\n\n  /**\n   * Sets a table name for the backup of the original table.\n   *\n   * @param tableName the table name for backup\n   * @return this for method chaining\n   */\n  default MigrateTable backupTableName(String tableName) {\n    throw new UnsupportedOperationException(\"Backup table name cannot be specified\");\n  }\n\n  /**\n   * Sets the executor service to use for parallel file reading. The default is not using executor\n   * service.\n   *\n   * @param service executor service\n   * @return this for method chaining\n   */\n  default MigrateTable executeWith(ExecutorService service) {\n    throw new UnsupportedOperationException(\"Setting executor service is not supported\");\n  }\n\n  /**\n   * Enables ignoring {@link java.io.FileNotFoundException} when listing source data files. When\n   * enabled, source data files that have disappeared (for example, because a partition directory\n   * was removed by concurrent cleanup) are skipped with a warning instead of failing the migration.\n   * The default is to fail.","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java#L43-L79","documentation":"MigrateTable is an interface whose backupTableName(String) default implementation throws UnsupportedOperationException. Only action implementations that actually support naming the backup table override it; on the interface itself the method is a deliberate stub. Calling it against an implementation that has not overridden it means the migration cannot create a named backup of the original table.","triggerScenarios":"Calling migrateTable.backupTableName(\"backup\") on an IcebergActions MigrateTable instance whose concrete implementation (e.g. a catalog or framework binding) does not override the default method.","commonSituations":"Users of a catalog integration (e.g. a custom ActionProvider or a non-Spark engine) that implements MigrateTable minimally assume all fluent options are supported because the Spark implementation supports them; the call fails at build time before execute() runs.","solutions":["Remove the backupTableName(...) call and let the implementation use its default backup behavior","Use an implementation that supports backup names (e.g. SparkActions SparkMigrateTable) instead of the current one","Check the concrete action class for an override of backupTableName before invoking it","Catch UnsupportedOperationException and fall back to a plan that does not rely on the backup table"],"exampleFix":"// before\nMigrateTable.Result r = actions.migrateTable(table)\n    .backupTableName(\"table_backup\")\n    .execute();\n// after\nMigrateTable.Result r = actions.migrateTable(table)\n    .execute(); // no backup name support in this implementation","handlingStrategy":"try-catch","validationCode":"if (migrateTable.getClass().getName().endsWith(\"MigrateTable\")) {\n  throw new IllegalStateException(\"Implementation may not support backupTableName\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  builder.backupTableName(\"backup\");\n} catch (UnsupportedOperationException e) {\n  // proceed without a named backup table\n}","preventionTips":["Assume fluent options on action interfaces are optional and may be unimplemented stubs","Prefer the canonical implementation (e.g. SparkActions) when advanced options are needed","Check the concrete class source for method overrides before relying on them","Test action configuration paths in the target engine before production use"],"tags":["unsupported-operation","java","table-migration","fluent-api"],"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"}