def _to_databricks_filter(standard_filters: MetadataFilters) -> dict:
    """Convert from standard dataclass to databricks filter dict."""
    filters = {}

    condition = standard_filters.condition or FilterOperator.AND

    for filter in standard_filters.filters:
        value = filter.value if isinstance(filter.value, list) else [filter.value]

        transformed_operator = _transform_databricks_filter_operator(filter.operator)

        if transformed_operator == "":
            key = filter.key

        else:
            key = f"{filter.key} {transformed_operator}"

        if key in filters:
            raise ValueError(f"filter condition already exists for {key}")

        filters[key] = value

    if condition == FilterCondition.AND:
        return filters

    elif condition == FilterCondition.OR:
        keys, values = zip(*filters.items())
        return {" OR ".join(keys): values}

    raise ValueError(f"condition {condition} is not supported")
Convert from standard dataclass to databricks filter dict.
llama-index-integrations/vector_stores/llama-index-vector-stores-databricks/llama_index/vector_stores/databricks/base.py