@Override
  public int execute() throws HiveException {
    DataOutputStream outStream = ShowUtils.getOutputStream(desc.getResFile(), context);
    try {
      return showCreateDatabase(outStream);
    } catch (Exception e) {
      throw new HiveException(e);
    } finally {
      IOUtils.closeStream(outStream);
    }
  }
Operation process showing the creation of a database.
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/showcreate/ShowCreateDatabaseOperation.java