public boolean isPrepareQuery() {
    return prepareQuery;
  }
This method is to get the dynamic partition specifications inserted by the FileSinkOperator, a particular MoveTask belongs to.
This is needed for insert overwrite queries for ACID tables with direct insert on, so each MoveTask could list only the
files inserted by the FSO the MoveTask belongs to. In case of an insert query, the writeId and statementId is enough to
identify which delta directory was written by which FSO. But in case of insert overwrite, base directories will be created
without statementIds, so we need the partition information to identify which folders to list.

For queries with union all optimisation, there will be multiple FSOs with the same operation, writeId and moveTaskId.
But one of these FSOs doesn't contain the partition specifications, so if this FSO is selected, the file listing will not be correct.
So check the acidSinks and if two of them have the same writeId, path and moveTaskId, then return null.
With doing this, the file listing will find all partitions and files correctly.

@param writeId
@param moveTaskId
@param acidOperation
@param path
@return The dynamic partition specifications from the FileSinkOperator with the given writeId, moveTaskId, operation and path.
null if there are multiple FileSinkOperators with the same value of these parameters.
ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java