private void printHeader(IDriver qp, PrintStream out) {
    List<FieldSchema> fieldSchemas = qp.getSchema().getFieldSchemas();
    if (HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_CLI_PRINT_HEADER)
          && fieldSchemas != null) {
      // Print the column names
      boolean first_col = true;
      for (FieldSchema fs : fieldSchemas) {
        if (!first_col) {
          out.print('\t');
        }
        out.print(fs.getName());
        first_col = false;
      }
      out.println();
    }
  }
If enabled and applicable to this command, print the field headers
for the output.

@param qp Driver that executed the command
@param out PrintStream which to send output to
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java