@Override
  public void addWriteIdsToMinHistory(QueryPlan plan, ValidTxnWriteIdList txnWriteIds) {
    if (plan.getInputs().isEmpty()) {
      return;
    }
    Map<String, Long> writeIds = plan.getInputs().stream()
      .filter(input -> !input.isDummy() && AcidUtils.isTransactionalTable(input.getTable()))
      .map(input -> input.getTable().getFullyQualifiedName())
      .distinct()
      .collect(Collectors.toMap(Function.identity(), txnWriteIds::getMinOpenWriteId));

    if (!writeIds.isEmpty()) {
      try {
        getMS().addWriteIdsToMinHistory(txnId, writeIds);
      } catch (TException | LockException e) {
        throw new RuntimeException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e);
      }
    }
  }
This modifies the logic wrt what operations are allowed in a transaction.  Multi-statement
transaction support is incomplete but it makes some Acid tests cases much easier to write.
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java