public static List<String> filterTableNamesIfEnabled(
      boolean isFilterEnabled, MetaStoreFilterHook filterHook, String catName, String dbName,
      List<String> tableNames) throws MetaException{

    if (isFilterEnabled) {
      return filterHook.filterTableNames(catName, dbName, tableNames);
    }

    return tableNames;
  }
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 catName: the catalog name of the tables
@param dbName: the database name to the tables
@param tableNames: the list of table names to filter
@return the list of table names 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