int print(ResultSet rs) throws SQLException {
    String format = getOpts().getOutputFormat();
    OutputFormat f = (OutputFormat) formats.get(format);

    if (f == null) {
      error(loc("unknown-format", new Object[] {
          format, formats.keySet()}));
      f = new TableOutputFormat(this);
    }

    Rows rows;

    if (f instanceof TableOutputFormat) {
      if (getOpts().getIncremental()) {
        rows = new IncrementalRowsWithNormalization(this, rs);
      } else {
        rows = new BufferedRows(this, rs);
      }
    } else {
      rows = new IncrementalRows(this, rs);
    }
    return f.print(rows);
  }
Output a progress indicator to the console.

@param cur
         the current progress
@param max
         the maximum progress, or -1 if unknown
beeline/src/java/org/apache/hive/beeline/BeeLine.java