public static List<String> getPartitionColumns(TableScanOperator tableScanOp) {
    TableSpec tblSpec = tableScanOp.getConf().getTableMetadata().getTableSpec();
    if (tblSpec.tableHandle.isPartitioned()) {
      return new ArrayList<String>(tblSpec.getPartSpec().keySet());
    }
    return Collections.emptyList();
  }
Skip temporary file generation for:
1. MM Tables
2. INSERT operation on full ACID table
ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java