class ReplicaTableFactoryProvider {

  public ReplicaTableFactory newInstance(TableReplication tableReplication) {
    if (tableReplication.getSourceTable().isGeneratePartitionFilter()) {
      return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation,
          partitionTransformation, columnStatisticsTransformation);
    }
    return new ReplicaTableFactory(sourceHiveConf, tableTransformation, partitionTransformation,
        columnStatisticsTransformation);
  }

  @Autowired public  ReplicaTableFactoryProvider(
      @Value("#{sourceHiveConf}") HiveConf sourceHiveConf,
      @Value("#{checksumFunction}") Function<Path, String> checksumFunction,
      TableTransformation tableTransformation,
      PartitionTransformation partitionTransformation,
      ColumnStatisticsTransformation columnStatisticsTransformation);

}