from typing import Tuple
from typing import Union


def _create_column_filter(
    column_name: str, value: str
) -> Tuple[str, str, Union[str, Tuple]]:
    """
    Create disjunctive normal form (DNF) filters, based on value
    https://jorisvandenbossche.github.io/arrow-docs-preview/html-option-1/python/generated/pyarrow.parquet.read_table.html#pyarrow-parquet-read-table

    """
    value_list = value.split(',')
    if len(value_list) > 1:
        values = tuple(val.strip() for val in value_list)
        filters = (column_name, "in", values)
    else:
        filters = (column_name, "==", value_list[0])
    return filters