@Override
  public int execute() throws HiveException {
    try {
      HiveMetaHook hook = desc.getTable().getStorageHandler().getMetaHook();
      if (hook == null || !(hook instanceof DefaultHiveMetaHook)) {
        return 0;
      }

      DefaultHiveMetaHook hiveMetaHook = (DefaultHiveMetaHook) hook;
      hiveMetaHook.preInsertTable(desc.getTable().getTTable(), desc.isOverwrite());
    } catch (MetaException e) {
      throw new HiveException(e);
    }

    return 0;
  }
Operation process of pre inserting a table.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/misc/preinsert/PreInsertTableOperation.java