public SortedPosDeleteWriter<Record> buildBasePosDeleteWriter(
        long mask, long index, StructLike partitionKey) {
      writeBasePreconditions();
      FileFormat fileFormat =
          FileFormat.valueOf(
              (table
                  .properties()
                  .getOrDefault(
                      TableProperties.BASE_FILE_FORMAT, TableProperties.BASE_FILE_FORMAT_DEFAULT)
                  .toUpperCase(Locale.ENGLISH)));
      GenericAppenderFactory appenderFactory =
          new GenericAppenderFactory(base.schema(), table.spec()).setAll(table.properties());
      appenderFactory.set(
          org.apache.iceberg.TableProperties.METRICS_MODE_COLUMN_CONF_PREFIX
              + MetadataColumns.DELETE_FILE_PATH.name(),
          MetricsModes.Full.get().toString());
      appenderFactory.set(
          org.apache.iceberg.TableProperties.METRICS_MODE_COLUMN_CONF_PREFIX
              + MetadataColumns.DELETE_FILE_POS.name(),
          MetricsModes.Full.get().toString());
      return new SortedPosDeleteWriter<>(
          appenderFactory,
          new CommonOutputFileFactory(
              base.location(),
              table.spec(),
              fileFormat,
              table.io(),
              base.encryption(),
              partitionId,
              taskId,
              transactionId),
          table.io(),
          fileFormat,
          mask,
          index,
          partitionKey);
    }
Builder to create writers for {@link KeyedTable} writting {@link Record}.
amoro-format-iceberg/src/main/java/org/apache/amoro/io/writer/GenericTaskWriters.java