public static DataOperationType toDataOperationType(Operation op) {
    switch (op) {
      case NOT_ACID:
        return DataOperationType.UNSET;
      case INSERT:
        return DataOperationType.INSERT;
      case UPDATE:
        return DataOperationType.UPDATE;
      case DELETE:
        return DataOperationType.DELETE;
      default:
        throw new IllegalArgumentException("Unexpected Operation: " + op);
    }
  }
Logically this should have been defined in Operation but that causes a dependency
on metastore package from exec jar (from the cluster) which is not allowed.
This method should only be called from client side where metastore.* classes are present.
Not following this will not be caught by unit tests since they have all the jar loaded.
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java