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.
Currently, the merge insert conditional predicates (
WhenNotMatchedBySource::delete_ifandWhenMatched::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_ifparses the SQL string into a datafusion expression viaPlanner::parse_filter.update_ifstores the string and defers parsing.Similar to how
DeleteBuilderwas extended with from_expr in #6343, it would be useful to support passing adatafusion_expr::Exprdirectly into these methods, avoiding the SQL string round-trip when callers already have an expression.