private static void updatePathForMapWork(Path newPath, MapWork work, Path path) {
    // update the work
    if (!newPath.equals(path)) {
      PartitionDesc partDesc = work.getPathToPartitionInfo().get(path);
      work.addPathToAlias(newPath, work.getPathToAliases().get(path));
      work.removePathToAlias(path);

      work.removePathToPartitionInfo(path);
      work.addPathToPartitionInfo(newPath, partDesc);
    }
  }
Computes a list of all input paths needed to compute the given MapWork. All aliases
are considered and a merged list of input paths is returned. If any input path points
to an empty table or partition a dummy file in the scratch dir is instead created and
added to the list. This is needed to avoid special casing the operator pipeline for
these cases.

@param job JobConf used to run the job
@param work MapWork encapsulating the info about the task
@param hiveScratchDir The tmp dir used to create dummy files if needed
@param ctx Context object
@return List of paths to process for the given MapWork
@throws Exception
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java