private void showRemainingLogsIfAny(Statement statement) {
    if (statement instanceof HiveStatement) {
      HiveStatement hiveStatement = (HiveStatement) statement;
      List<String> logs = null;
      do {
        try {
          logs = hiveStatement.getQueryLog();
        } catch (SQLException e) {
          beeLine.error(new SQLWarning(e));
          return;
        }
        for (String log : logs) {
          if (!beeLine.isTestMode()) {
            beeLine.info(log);
          } else {
            // In test mode print the logs to the output
            beeLine.output(log);
          }
        }
      } while (logs.size() > 0);
    } else {
      beeLine.debug("The statement instance is not HiveStatement type: " + statement.getClass());
    }
  }
Given a cmdpart (e.g. if a command spans multiple lines), add to the current command, and if
applicable add that command to the {@link List} of commands
beeline/src/java/org/apache/hive/beeline/Commands.java