class DataSourceNode extends PlanNode {

  @Override
  void validateKeyPresent(final SourceName sinkName, final Projection projection) {
    if (getSchema().key().isEmpty()) {
      // No key column.
      return;
    }

    final ColumnName keyName = Iterables.getOnlyElement(getSchema().key()).name();

    if (!projection.containsExpression(new QualifiedColumnReferenceExp(getAlias(), keyName))
        && !projection.containsExpression(new UnqualifiedColumnReferenceExp(keyName))
    ) {
      throwKeysNotIncludedError(sinkName, "key column", ImmutableList.of(
          (ColumnReferenceExp) new UnqualifiedColumnReferenceExp(keyName)));
    }
  }

  public  DataSourceNode(
      final PlanNodeId id,
      final DataSource dataSource,
      final SourceName alias
  );
    DataSourceNode(
      final PlanNodeId id,
      final DataSource dataSource,
      final SourceName alias,
      final SchemaKStreamFactory schemaKStreamFactory
  );

}