class PartitionPredicateFactory {

  public PartitionPredicate newInstance(TableReplication tableReplication) {
    if (tableReplication.getSourceTable().isGeneratePartitionFilter()) {
      return new DiffGeneratedPartitionPredicate(sourceFactory.newInstance(tableReplication),
          replicaFactory.newInstance(tableReplication), tableReplication, checksumFunction);
    } else {
      return new SpelParsedPartitionPredicate(expressionParser, tableReplication);
    }
  }

  public  PartitionPredicateFactory(
      HiveEndpointFactory<? extends HiveEndpoint> sourceFactory,
      HiveEndpointFactory<? extends HiveEndpoint> replicaFactory,
      SpringExpressionParser expressionParser,
      Function<Path, String> checksumFunction);

}