@Override
  public void validateSinkDesc(FileSinkDesc sinkDesc) throws SemanticException {
    HiveStorageHandler.super.validateSinkDesc(sinkDesc);
    if (sinkDesc.getInsertOverwrite()) {
      Table table = IcebergTableUtil.getTable(conf, sinkDesc.getTableInfo().getProperties());
      if (table.currentSnapshot() != null &&
          Long.parseLong(table.currentSnapshot().summary().get(TOTAL_RECORDS_PROP)) == 0) {
        // If the table is empty we don't have any danger that some data can get lost.
        return;
      }
      if (RewritePolicy.fromString(conf.get(ConfVars.REWRITE_POLICY.varname)) != RewritePolicy.DEFAULT) {
        // Table rewriting has special logic as part of IOW that handles the case when table had a partition evolution
        return;
      }
      if (IcebergTableUtil.isBucketed(table)) {
        throw new SemanticException("Cannot perform insert overwrite query on bucket partitioned Iceberg table.");
      }
      if (hasUndergonePartitionEvolution(table)) {
        throw new SemanticException(
            "Cannot perform insert overwrite query on Iceberg table where partition evolution happened. In order " +
            "to successfully carry out any insert overwrite operation on this table, the data has to be rewritten " +
            "conforming to the latest spec. ");
      }
    }
  }
Iceberg's optimistic concurrency control fails to provide means for IOW and Insert operations isolation.
Use `hive.txn.ext.locking.enabled` config to create Hive locks in order to guarantee data consistency.
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java