public static void setPartitionColumnNames(Configuration conf, TableScanOperator tableScanOp) {
    TableScanDesc scanDesc = tableScanOp.getConf();
    Table metadata = scanDesc.getTableMetadata();
    if (metadata == null) {
      return;
    }
    List<FieldSchema> partCols = metadata.getPartCols();
    if (partCols != null && !partCols.isEmpty()) {
      conf.set(serdeConstants.LIST_PARTITION_COLUMNS, MetaStoreUtils.getColumnNamesFromFieldSchema(partCols));
    }
  }
Sets partition column names to the configuration, if there is available info in the operator.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java