public static List<Table> filterTablesIfEnabled(
      boolean isFilterEnabled, MetaStoreFilterHook filterHook, List<Table> tables)
      throws MetaException{

    if (isFilterEnabled) {
      return filterHook.filterTables(tables);
    }

    return tables;
  }
Filter the list of tables if filtering is enabled. Otherwise, return original list
@param isFilterEnabled true: filtering is enabled; false: filtring is disabled.
@param filterHook: the object that does filtering
@param tables: the list of table objects to filter
@return the list of tables that current user has access if filtering is enabled;
        otherwise, the original list
@throws MetaException
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/FilterUtils.java