def _get_indexed_columns(datasets):
    """
    Get columns that where indexed by Kartothek.

    Parameters
    ----------
    datasets: Dict[str, kartothek.core.dataset.DatasetMetadata]
        Available datasets.

    Returns
    -------
    indexed_columns: Dict[str, Set[str]]
        Indexed columns per ktk_cube dataset ID.
    """
    result = {}
    for ktk_cube_dataset_id, ds in datasets.items():
        result[ktk_cube_dataset_id] = set(ds.indices.keys())
    return result