Repository navigation
lancedb-c v0.1.0-preview.1
Pre-releaselancedb-c v0.1.0-preview.1
Prebuilt C shared libraries for 5 supported native targets.
This is a preview release. The C ABI may change before 1.0; recompile C and C++ callers against the published header.
Release provenance
| Field | Value |
|---|---|
| Tag | v0.1.0-preview.1 |
| Tag ref object | ef1db065fa3d5710d0f17815f2f585db524b2f7a |
| Tag type | annotated |
| Peeled commit | 0d8439a09161d6362901f54e6564e25857f9070a |
| Package version | 0.1.0-preview.1 |
| LanceDB SDK | lancedb 0.42.0-beta.21 (v0.42.0-beta.21), revision b35cce60d66e5ae58e7ef470af7bd268d22c0396 |
| Lance | 15.0.0-beta.25 (v15.0.0-beta.25), revision f5dbd55dd79f1f0412f897ed1917128300fb8c1a |
The Lance revision covers lance, lance-io and lance-namespace.
Packages
| Target | Archive | SHA-256 |
|---|---|---|
linux-amd64 |
lancedb-c-0d8439a09161d6362901f54e6564e25857f9070a-linux-amd64.tar.gz |
adce8ad3d9dd3877967e5ff9a788a77c00832e2307d9c2617804c48e84995795 |
linux-arm64 |
lancedb-c-0d8439a09161d6362901f54e6564e25857f9070a-linux-arm64.tar.gz |
7ab8add75248432c2e715b1d3141e4b60c35aa1b610ecb8b5e6273d59a77daef |
darwin-arm64 |
lancedb-c-0d8439a09161d6362901f54e6564e25857f9070a-darwin-arm64.tar.gz |
89da456bc7c741900a1169d8be1d3e9f55f08f0815d5764149ffb76a389085b3 |
windows-amd64 |
lancedb-c-0d8439a09161d6362901f54e6564e25857f9070a-windows-amd64.tar.gz |
a00ff4ff077a5a7c67ac85f421b1273a0b99436f0e729a8f193520a84d6108ef |
windows-arm64 |
lancedb-c-0d8439a09161d6362901f54e6564e25857f9070a-windows-arm64.tar.gz |
be3873bb23ce971a86035f7f0367ce80c43edbed379c3f768fc5cc6dce5574f3 |
Each archive has a sibling .sha256 file. SHA256SUMS lists all 5 archives.
Archives contain LICENSE, include/lancedb.h, the target shared library, manifest.json and an internal SHA256SUMS. The manifest records the tag-derived version and peeled commit.
Migrating from earlier source snapshots
This is the first tagged lancedb-c preview. Recompile every C and C++ caller
against the include/lancedb.h shipped in the package; do not reuse objects,
headers or binaries from an earlier checkout. The C ABI and several public
declarations changed.
lancedb_connection_open_table now returns an error code
Before, the function returned the table directly and had no error message:
LanceDBTable* table = lancedb_connection_open_table(connection, "table");
if (table == NULL) {
/* no error text available */
}The new form returns LanceDBError and writes the table and an optional error
message through out-parameters:
LanceDBTable* table = NULL;
char* error = NULL;
LanceDBError rc = lancedb_connection_open_table(
connection, "table", &table, &error);
if (rc != LANCEDB_SUCCESS) {
fprintf(stderr, "%s\n",
error != NULL ? error : lancedb_error_to_message(rc));
lancedb_free_string(error);
}lancedb_connect_builder_execute follows the same pattern:
(builder, &connection, &error). It consumes every non-NULL builder,
including when the connection fails. Free returned error strings with
lancedb_free_string().
LANCEDB_UNKNOWN moved to 99
LANCEDB_UNKNOWN is now 99. Earlier snapshots used 21, then 22 after
LANCEDB_NAMESPACE took 21. The current header assigns 22 to
LANCEDB_PERMISSION_DENIED and 23 to LANCEDB_NOT_FOUND. Use the named
constants and lancedb_error_to_message() for comparisons and messages.
Query result conversion now preserves SDK errors
Earlier snapshots turned any failure while draining a query result into
LANCEDB_UNKNOWN. lancedb_query_result_to_arrow now returns the mapped SDK
error code and diagnostic for stream failures, and LANCEDB_ARROW with the
conversion detail when the result schema cannot be represented through the Arrow
C data interface. It clears non-NULL output slots and the error message on
entry, and publishes batches, schema and count only after the complete result is
ready. With all required pointers valid, the result is consumed on every path.
If result or a required output pointer is NULL, the call returns
LANCEDB_INVALID_ARGUMENT without consuming a non-NULL result. An empty
success still returns NULL batches and schema with a zero count.
The FTS token option was renamed
LanceDBFtsIndexConfig.max_tokens is now max_token_length. The old field was
documented as a tokens-per-document limit but was never applied by the binding.
The new field is forwarded to the SDK as the maximum token length; -1 leaves
it unlimited. The same header also removes LanceDBVectorIndexConfig.accelerator
and LanceDBScalarIndexConfig.force_update_statistics; neither had an effect.
LanceDBFtsIndexConfig config = {0};
config.base_tokenizer = "simple";
config.max_token_length = -1;
config.lowercase = 1;
config.replace = 1;Merge conditions are nullable and explicit
LanceDBMergeInsertConfig now has two optional matched-update conditions after
its two flags. Earlier snapshots had only when_matched_update_all and
when_not_matched_insert_all; the condition fields did not exist.
when_matched_update_all_condition: SQL predicate,NULLfor no condition.when_matched_update_all_expr: DataFusion expression,NULLfor no
condition.
The conditions are read only when when_matched_update_all is set, and they are
mutually exclusive; setting both returns LANCEDB_INVALID_ARGUMENT. The
expression is borrowed for the call and must still be freed by the caller with
lancedb_expr_free(). Zero-initialize the whole struct when migrating, because
the new fields are pointers:
LanceDBMergeInsertConfig config = {0};
config.when_matched_update_all = 1;
config.when_matched_update_all_condition =
"target.version < source.version";
config.when_not_matched_insert_all = 1;
rc = lancedb_table_merge_insert(
table, reader, keys, key_count, &config, &error);lancedb_table_merge_insert_with_result adds explicit actions, a by-source
delete filter and the SDK result. The legacy lancedb_table_merge_insert entry
point remains available.
LanceDBMergeInsertOptions options = {0};
options.when_matched_update_all = 1;
options.when_matched_update_all_condition =
"target.version < source.version"; /* NULL = all matched rows */
options.when_not_matched_insert_all = 1;
options.when_not_matched_by_source_delete = 1;
options.when_not_matched_by_source_delete_filter =
"version < 10"; /* NULL = no filter; "" is passed through */
options.use_index = -1; /* SDK default; 0 disables, 1 allows */
options.timeout_ms = -1; /* SDK default; 0 is an explicit zero timeout */
LanceDBMergeInsertResult result = {0};
rc = lancedb_table_merge_insert_with_result(
table, reader, keys, key_count, &options, &result, &error);NULL means no condition. A non-NULL filter string, including an empty string,
is passed to the SDK. Zero-initialization is not the SDK default for
use_index and timeout_ms; set both to -1 when you want the defaults. The
result counters come from the SDK, and zero can mean "not reported" rather than
"no work".
Removed no-op maintenance symbols
These exported functions were not declared in the public header, did nothing and
returned success:
lancedb_table_cleanup_old_versions(table, older_than_days, delete_unverified, &error);
lancedb_table_compact_files(table, &error);
lancedb_table_restore_version(table, version, &error);Use the supported replacements:
- Compaction:
lancedb_table_optimize(table, LANCEDB_OPTIMIZE_COMPACT, &error)
orlancedb_table_optimize_with_actionwithLanceDBCompactionOptions. - Pruning:
lancedb_table_optimize(table, LANCEDB_OPTIMIZE_PRUNE, &error)or
lancedb_table_optimize_with_actionwithLanceDBPruneOptions
(older_than_nanos,delete_unverified,
error_if_tagged_old_versions).older_than_nanosreplaces the old
older_than_daysidea; the SDK default age applies unless the
LANCEDB_PRUNE_OLDER_THANfield is set. - Version restore:
lancedb_table_checkout(table, version, &error)to read that
version, thenlancedb_table_restore(table, &error)to promote it to the
latest version.lancedb_table_checkout_latestmakes the existing handle
track the latest version again.
For LanceDB Enterprise tables, only compaction is supported; the other optimize
actions return LANCEDB_NOT_SUPPORTED.
New query controls in this preview
These additions cover the Go-main query behavior that the pinned SDK implements:
lancedb_query_with_row_idandlancedb_vector_query_with_row_idappend the
UInt64_rowidmetadata column, including when a select list is set.lancedb_query_fast_searchandlancedb_vector_query_fast_searchuse an
index-only search. On a plain query this needs a scalar index for a filter, or
a text index for standalone full-text search; an unfiltered scan or a filter
without an index still reads every selected fragment. On a hybrid vector query
fast search applies to both legs.lancedb_vector_query_bypass_vector_indexruns an exhaustive flat vector
search. On a hybrid query it affects only the vector leg. Embedded LanceDB
applies fast search after bypass, so fast search wins when both are set; a
remote backend decides their interaction.lancedb_vector_query_rerank_rrfinstalls reciprocal rank fusion with an
explicitk; scores are1 / (k + rank)with ranks starting at 1. The value
is forwarded unchanged and the SDK default is 60 when the setter is not called.lancedb_vector_query_normselectsLANCEDB_NORMALIZE_SCOREor
LANCEDB_NORMALIZE_RANKfor a hybrid query. It changes the preserved_score
columns but not RRF ranking or_relevance_score. Invalid values leave the
previous selection unchanged.
Version check
Packages built from this tag expose LANCEDB_VERSION_MAJOR,
LANCEDB_VERSION_MINOR, LANCEDB_VERSION_PATCH, LANCEDB_VERSION_STRING and
lancedb_version(). The checked-in source header intentionally reports
0.0.0-dev; use the header installed by CMake or shipped in the package so the
compile-time macros match the loaded library. lancedb_version() returns a
static string owned by the library; do not free it.