code: protected List<HiveTable> getTables(Path path) throws IOException {
      List<HiveTable> tables = Lists.newArrayList();
  
      for (String databaseName : getDatabaseNames(path)) {
        // Get tables to register ONLY for this Hive database (specified via prefix filter in properties)
        boolean foundTablesViaDbFilter = false;
        for (String tableName : getTableNames(Optional.of(databaseName), path)) {
          tables.add(getTable(path, databaseName, tableName));
          foundTablesViaDbFilter = true;
        }
  
        // If no tables found via db filter, get tables to register in all Hive databases and add them for this database
        if (!foundTablesViaDbFilter) {
          for (String tableName : getTableNames(path)) {
            tables.add(getTable(path, databaseName, tableName));
          }
        }
      }
      return tables;
    }
docs: A base implementation for creating {@link HiveTable}s given a {@link Path}.
  
  <p>
  This method returns a list of {@link Hivetable}s that contains one table per db name
  (returned by {@link #getDatabaseNames(Path)}) and table name (returned by {@link #getTableNames(Path)}.
  </p>
  
  @param path a {@link Path} used to create the {@link HiveTable}.
  @return a list of {@link HiveTable}s for the given {@link Path}.
  @throws IOException