private Map<Path, Partition> getPathToPartitionMap(String alias, TableScanOperator tso) {
    Map<Path, Partition> pathToPartitionMap = new HashMap<>();
    try {
      Set<Partition> partitions = physicalContext.getParseContext()
          .getPrunedPartitions(alias, tso).getPartitions();
      for (Partition partition : partitions) {
        pathToPartitionMap.put(partition.getPartitionPath(), partition);
      }
    } catch (SemanticException e) {
      LOG.warn("Error while determining partitions of {}." +
          "We cannot determine its empty partitions from stats.", alias, e);
    }
    return pathToPartitionMap;
  }
Iterate over all tasks one by one and removes all input paths from task if
conditions as defined in rules match.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java