public static void appendReadColumns(Configuration conf, List<Integer> ids) {
    String id = toReadColumnIDString(ids);
    String old = conf.get(READ_COLUMN_IDS_CONF_STR, null);
    String newConfStr = HiveStringUtils.joinIgnoringEmpty(new String[] {id, old}, StringUtils.COMMA);
    setReadColumnIDConf(conf, newConfStr);
    // Set READ_ALL_COLUMNS to false
    conf.setBoolean(READ_ALL_COLUMNS, false);
  }
Appends read columns' ids (start from zero). Once a column
is included in the list, a underlying record reader of a columnar file format
(e.g. RCFile and ORC) can know what columns are needed.
serde/src/java/org/apache/hadoop/hive/serde2/ColumnProjectionUtils.java