class UserRepartitionNode extends RepartitionNode {

  @Override
  void validateKeyPresent(final SourceName sinkName, final Projection projection) {
    final Expression partitionBy = getPartitionBy();
    if (!(partitionBy instanceof NullLiteral) && !projection.containsExpression(partitionBy)) {
      final ImmutableList<Expression> keys = ImmutableList.of(originalPartitionBy);
      throwKeysNotIncludedError(sinkName, "partitioning expression", keys);
    }
  }

  public  UserRepartitionNode(
      final PlanNodeId id,
      final PlanNode source,
      final LogicalSchema schema,
      final Expression originalPartitionBy,
      final Expression partitionBy
  );

}