Repository navigation
add datafusion apis for list expressions - #53
Merged
Merged
Conversation
yuvalif
force-pushed
the
add_datafusion_list_expr
branch
from
May 28, 2026 06:12
bacebef to
fd6b099
Compare
6 of 17 tasks
currently only the array_has api is implemented Fixes: lancedb#52 Signed-off-by: Yuval Lifshitz <[email protected]>
support array_has() on JSON arrays Signed-off-by: Yuval Lifshitz <[email protected]>
yuvalif
force-pushed
the
add_datafusion_list_expr
branch
from
June 8, 2026 11:16
c2f1bfb to
e606e7d
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands the C DataFusion-expression API surface to support “list membership” filters, adding both a general array_has expression for Arrow list columns and a JSON-specific json_array_has helper built from json_get_array + array_has.
Changes:
- Add
lancedb_expr_array_hasfor filtering onlist<T>columns via DataFusion’sarray_hasUDF. - Add
lancedb_expr_json_array_hasto test membership within JSON array fields, with configurable quoting/casting behavior for string vs numeric/bool arrays. - Add comprehensive test coverage for both DataFusion query filtering and JSON matching semantics, plus new DataFusion function dependencies.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_json.cpp | Adds extensive JSON-array membership tests for json_array_has, including scalar and non-scalar element cases. |
| tests/test_df_query.cpp | Adds query-level tests demonstrating array_has filtering on list<utf8> columns and null-argument handling. |
| src/json.rs | Implements lancedb_expr_json_array_has by composing json_get_array with array_has and adapting the search value. |
| src/expr.rs | Exposes lancedb_expr_array_has as a new C-callable DataFusion expression builder. |
| include/lancedb.h | Adds public C API declarations/docs for lancedb_expr_array_has and lancedb_expr_json_array_has. |
| Cargo.toml | Adds DataFusion function crates needed for concat and array_has. |
| Cargo.lock | Locks newly added Rust dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Yuval Lifshitz <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
currently only the array_has api is implemented