Skip to content

Feature: support datafusion expression for merge insert predicates #3416

Description

@yuvalif

SDK

Rust

Description

Currently the merge insert conditional predicates in MergeInsertBuilder only accept SQL strings:
https://github.com/lancedb/lancedb/blob/main/rust/lancedb/src/table/merge.rs#L97
https://github.com/lancedb/lancedb/blob/main/rust/lancedb/src/table/merge.rs#L119
These are passed down to lance's WhenMatched::update_if and WhenNotMatchedBySource::delete_if, which parse them into datafusion expressions internally.

It would be useful to add expression-based variants for these predicates, avoiding the SQL string conversion when callers already have a datafusion_expr::Expr.
This depends on lance adding Expr support to its merge insert API first: lance-format/lance#6861

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions