@Override
    public void close() throws IOException {
      if(!lock.isPresent()) {
        return;
      }
      LOG.debug("LocalTableLock; unlocking: " + lock);
      HiveLockManager lockMgr;
      try {
        lockMgr = context.getHiveTxnManager().getLockManager();
        lockMgr.unlock(lockObj);
      } catch (LockException e1) {
        throw new IOException(e1);
      }
      LOG.debug("LocalTableLock; unlocked: " + lock);
    }
so to make sure we crate WriteEntity with the right WriteType.  This is (at this point) only
for consistency since LockManager (which is the only thing that pays attention to WriteType)
has done it's job before the query ran.
ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java