Skip to content

feature: support datafusion expression for merge insert predicates #6861

Description

@yuvalif

Currently, the merge insert conditional predicates (WhenNotMatchedBySource::delete_if and WhenMatched::update_if) only accept SQL string predicates:
https://github.com/lance-format/lance/blob/main/rust/lance/src/dataset/write/merge_insert.rs#L244
https://github.com/lance-format/lance/blob/main/rust/lance/src/dataset/write/merge_insert.rs#L284
delete_if parses the SQL string into a datafusion expression via Planner::parse_filter. update_if stores the string and defers parsing.
Similar to how DeleteBuilder was extended with from_expr in #6343, it would be useful to support passing a datafusion_expr::Expr directly into these methods, avoiding the SQL string round-trip when callers already have an expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions