'Returns the dictionary {schema : [result_set_name]}.
Datasource_type can be \'table\' or \'view\'.
Empty schema corresponds to the list of full names of the all
tables or views: <schema>.<result_set_name>.'

@classmethod
@cache_util.memoized_func(timeout=600, key=(lambda *args, **kwargs: u'db:{}:{}'.format(args[0].id, args[1])))
def fetch_result_sets(cls, db, datasource_type, force=False):

    result_set_df = db.get_df(u"SELECT    table_schema,    table_name    FROM    INFORMATION_SCHEMA.{}S\n                                                            ORDER    BY    concat(table_schema,    '.',    table_name)".format(datasource_type.upper()), None)
    result_sets = defaultdict(list)
    for (unused, row) in result_set_df.iterrows():
        result_sets[row[u'table_schema']].append(row[u'table_name'])
        result_sets[u''].append(u'{}.{}'.format(row[u'table_schema'], row[u'table_name']))
    return result_sets
