def _columns_filter_helper(columns):
    """Creates a union filter for a list of columns.

    :type columns: list
    :param columns: Iterable containing column names (as strings). Each column
                    name can be either

                      * an entire column family: ``fam`` or ``fam:``
                      * an single column: ``fam:col``

    :rtype: :class:`.RowFilterUnion`, :class:`.RowFilter`
    :returns: The union filter created containing all of the matched columns.
    :raises: :class:`ValueError <exceptions.ValueError>` if there are no
             filters to union.
    """
    filters = []
    for column_family_id, column_qualifier in _get_column_pairs(columns):
        if column_qualifier is not None:
            fam_filter = RowFilter(family_name_regex_filter=column_family_id)
            qual_filter = RowFilter(
                column_qualifier_regex_filter=column_qualifier)
            combined_filter = RowFilterChain(
                filters=[fam_filter, qual_filter])
            filters.append(combined_filter)
        else:
            fam_filter = RowFilter(family_name_regex_filter=column_family_id)
            filters.append(fam_filter)

    num_filters = len(filters)
    if num_filters == 0:
        raise ValueError('Must have at least one filter.')
    elif num_filters == 1:
        return filters[0]
    else:
        return RowFilterUnion(filters=filters)
 def _callFUT(self, *args, **kwargs):
     from gcloud_bigtable.happybase.batch import _get_column_pairs
     return _get_column_pairs(*args, **kwargs)