class DropTypeFactory {

  public DropTypeCommand create(final DropType statement) {
    final String typeName = statement.getTypeName();
    final boolean ifExists = statement.getIfExists();

    if (!ifExists && !metaStore.resolveType(typeName).isPresent()) {
      throw new KsqlException("Type " + typeName + " does not exist.");
    }

    return new DropTypeCommand(typeName);
  }

    DropTypeFactory(final MetaStore metaStore);

}