@lancedb/lancedb 0.42.0-beta.1 → 0.42.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arrow.js +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/native.d.ts +135 -3
- package/dist/native.js +52 -52
- package/dist/query.d.ts +8 -0
- package/dist/query.js +5 -0
- package/dist/table.d.ts +144 -6
- package/dist/table.js +28 -5
- package/package.json +9 -9
- package/pnpm-workspace.yaml +0 -7
package/dist/arrow.js
CHANGED
|
@@ -1070,7 +1070,9 @@ async function fromBufferToRecordBatch(data) {
|
|
|
1070
1070
|
* Create a buffer containing a single record batch
|
|
1071
1071
|
*/
|
|
1072
1072
|
async function fromRecordBatchToBuffer(batch) {
|
|
1073
|
-
|
|
1073
|
+
// Arrow writers require data types from their own library instance.
|
|
1074
|
+
const table = (0, sanitize_1.sanitizeTable)({ schema: batch.schema, batches: [batch] });
|
|
1075
|
+
const writer = new apache_arrow_1.RecordBatchFileWriter().writeAll(table);
|
|
1074
1076
|
return Buffer.from(await writer.toUint8Array());
|
|
1075
1077
|
}
|
|
1076
1078
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { MaterializedView, MaterializedViewDefinition, MaterializedViewSelect, }
|
|
|
7
7
|
export { ViewDescription } from "./view";
|
|
8
8
|
export { JsHeaderProvider as NativeJsHeaderProvider } from "./native.js";
|
|
9
9
|
export { instrumentLanceDbMetrics } from "./otel";
|
|
10
|
-
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, RefreshColumnResult, FunctionErrors, FunctionErrorsOptions, FunctionErrorRecord, FunctionErrorFragment, RefreshMaterializedViewResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
10
|
+
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, RefreshColumnOptions, FunctionWorkerResourceBudget, RefreshColumnResult, FunctionErrors, FunctionErrorsOptions, FunctionErrorRecord, FunctionErrorFragment, RefreshMaterializedViewResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
11
11
|
export { makeArrowTable, makeJsonField, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
12
12
|
export { blob, isBlobField, BlobFile } from "./blob";
|
|
13
13
|
export type { BlobData, BlobInput, BlobOptions, BlobRange, BlobReadOptions, BlobUri, } from "./blob";
|
|
@@ -17,7 +17,7 @@ export { Job, JobEventsOptions, } from "./job";
|
|
|
17
17
|
export type { JobProgress, JobProgressCallback } from "./job";
|
|
18
18
|
export { AutoQuery, ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, AnalyzePlanDistributedMetrics, BlobMode, QueryExecutionOptions, ColumnOrdering, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, BooleanQuery, FullTextQueryType, Operator, Occur, } from "./query";
|
|
19
19
|
export { Index, IndexOptions, IvfPqOptions, IvfRqOptions, IvfFlatOptions, HnswPqOptions, HnswSqOptions, FtsOptions, BaseTokenizer, } from "./indices";
|
|
20
|
-
export { Table, Branches, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, CherryPickError, BranchDiff, CherryPickPreview, CherryPickResult, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, RTEWriteSpec, RTEStats, TableShardStats, SsTableStats, MemtableStats, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
20
|
+
export { Table, FunctionColumnAutoRefreshStatus, FunctionColumnLastRefreshJob, FunctionColumnStatus, FunctionColumnVersionStatus, Branches, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, CherryPickError, BranchDiff, CherryPickPreview, CherryPickResult, AddDataOptions, UpdateOptions, OptimizeOptions, CompactionOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, RTEWriteSpec, RTEStats, TableShardStats, SsTableStats, MemtableStats, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
21
21
|
export { HeaderProvider, StaticHeaderProvider, OAuthHeaderProvider, TokenResponse, } from "./header";
|
|
22
22
|
export { ClientAuthMethod, OAuthConfig, OAuthFlowType, OAuthSession, SessionLogout, SessionStatus, TokenCacheOptions, } from "./oauth";
|
|
23
23
|
export { MergeInsertBuilder, WriteExecutionOptions } from "./merge";
|
package/dist/native.d.ts
CHANGED
|
@@ -463,9 +463,12 @@ export declare class Table {
|
|
|
463
463
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
464
464
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
465
465
|
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
466
|
-
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
467
|
-
refreshColumnAsync(column: string): Promise<Job>
|
|
466
|
+
refreshColumn(column: string, options?: RefreshColumnOptions | undefined | null): Promise<RefreshColumnResult>
|
|
467
|
+
refreshColumnAsync(column: string, options?: RefreshColumnOptions | undefined | null): Promise<Job>
|
|
468
468
|
functionErrors(options?: FunctionErrorsOptions | undefined | null): Promise<FunctionErrors>
|
|
469
|
+
functionColumnStatuses(column?: string | undefined | null): Promise<Array<FunctionColumnStatus>>
|
|
470
|
+
functionColumnStatus(column: string): Promise<FunctionColumnStatus>
|
|
471
|
+
waitForFunctionColumn(column: string, timeoutSeconds?: number | undefined | null): Promise<FunctionColumnStatus>
|
|
469
472
|
refreshMaterializedView(sourceVersion?: number | undefined | null, full?: boolean | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
470
473
|
materializedViewDefinition(): Promise<string>
|
|
471
474
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
@@ -492,7 +495,7 @@ export declare class Table {
|
|
|
492
495
|
branches(): Promise<Branches>
|
|
493
496
|
/** The branch this handle is scoped to, or `null` for the main branch. */
|
|
494
497
|
currentBranch(): string | null
|
|
495
|
-
optimize(beforeTimestampMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null): Promise<OptimizeStats>
|
|
498
|
+
optimize(beforeTimestampMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null, compactionOptions?: CompactionOptions | undefined | null): Promise<OptimizeStats>
|
|
496
499
|
listIndices(): Promise<Array<IndexConfig>>
|
|
497
500
|
tokenize(query: string, column?: string | undefined | null, indexName?: string | undefined | null): Promise<Array<FtsToken>>
|
|
498
501
|
indexStats(indexName: string): Promise<IndexStatistics | null>
|
|
@@ -672,6 +675,14 @@ export interface ColumnOrdering {
|
|
|
672
675
|
columnName: string
|
|
673
676
|
}
|
|
674
677
|
|
|
678
|
+
/** Per-invocation file-compaction settings. All numbers must be safe integers. */
|
|
679
|
+
export interface CompactionOptions {
|
|
680
|
+
targetRowsPerFragment?: number
|
|
681
|
+
maxSourceRows?: number
|
|
682
|
+
ioBufferSize?: number
|
|
683
|
+
batchSize?: number
|
|
684
|
+
}
|
|
685
|
+
|
|
675
686
|
/** Statistics about a compaction operation. */
|
|
676
687
|
export interface CompactionStats {
|
|
677
688
|
/** The number of fragments removed */
|
|
@@ -851,6 +862,54 @@ export interface FtsToken {
|
|
|
851
862
|
/** Call an arbitrary registered SQL function by name. */
|
|
852
863
|
export declare function func(name: string, args: Array<Expr>): Expr
|
|
853
864
|
|
|
865
|
+
/** Automatic-refresh projection for a Function output. */
|
|
866
|
+
export interface FunctionColumnAutoRefreshStatus {
|
|
867
|
+
enabled: boolean
|
|
868
|
+
intervalSeconds?: bigint
|
|
869
|
+
activeJobId?: string
|
|
870
|
+
state: string
|
|
871
|
+
failureStreak: number
|
|
872
|
+
effectiveCooldownMillis?: bigint
|
|
873
|
+
blockedReason?: string
|
|
874
|
+
nextRunAtMillis?: bigint
|
|
875
|
+
nextRunAtReason?: string
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/** Latest matching refresh Job projected for a Function output. */
|
|
879
|
+
export interface FunctionColumnLastRefreshJob {
|
|
880
|
+
jobId: string
|
|
881
|
+
state: string
|
|
882
|
+
automatic?: boolean
|
|
883
|
+
completedAtMillis?: bigint
|
|
884
|
+
failure?: JobFailureInfo
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/** Exact four-way status of one Function output at one table version. */
|
|
888
|
+
export interface FunctionColumnStatus {
|
|
889
|
+
column: string
|
|
890
|
+
bindingId: string
|
|
891
|
+
function: FunctionColumnVersionStatus
|
|
892
|
+
tableVersion: bigint
|
|
893
|
+
rows: bigint
|
|
894
|
+
fresh: bigint
|
|
895
|
+
stale: bigint
|
|
896
|
+
neverComputed: bigint
|
|
897
|
+
failed: bigint
|
|
898
|
+
lastRefreshJob?: FunctionColumnLastRefreshJob
|
|
899
|
+
lastFailureJob?: FunctionColumnLastRefreshJob
|
|
900
|
+
autoRefresh: FunctionColumnAutoRefreshStatus
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/** One exact immutable Function revision attached to a table output. */
|
|
904
|
+
export interface FunctionColumnVersionStatus {
|
|
905
|
+
name: string
|
|
906
|
+
namespacePath: Array<string>
|
|
907
|
+
objectId: string
|
|
908
|
+
location: string
|
|
909
|
+
version: string
|
|
910
|
+
manifestDigest: string
|
|
911
|
+
}
|
|
912
|
+
|
|
854
913
|
/**
|
|
855
914
|
* A fragment whose per-row error detail was capped: `rowsSkipped` rows
|
|
856
915
|
* failed, of which only `rowsRecorded` have a record of their own.
|
|
@@ -877,6 +936,8 @@ export interface FunctionErrorRecord {
|
|
|
877
936
|
tableVersion: number
|
|
878
937
|
errorType: string
|
|
879
938
|
errorMessage: string
|
|
939
|
+
/** User-code traceback, possibly truncated by the server. */
|
|
940
|
+
traceback?: string
|
|
880
941
|
createdAtMillis: number
|
|
881
942
|
}
|
|
882
943
|
|
|
@@ -900,6 +961,16 @@ export interface FunctionErrorsOptions {
|
|
|
900
961
|
limit?: number
|
|
901
962
|
}
|
|
902
963
|
|
|
964
|
+
/** Aggregate worker resources for one Enterprise Function refresh. */
|
|
965
|
+
export interface FunctionWorkerResourceBudget {
|
|
966
|
+
/** Aggregate CPU budget in millicores; 1000 is one CPU. */
|
|
967
|
+
cpuMillis: number
|
|
968
|
+
/** Aggregate memory budget in bytes. */
|
|
969
|
+
memoryBytes: number
|
|
970
|
+
/** Aggregate GPU budget. Omitted means zero, a CPU-only refresh. */
|
|
971
|
+
gpuCount?: number
|
|
972
|
+
}
|
|
973
|
+
|
|
903
974
|
/** A description of an index currently configured on a column */
|
|
904
975
|
export interface IndexConfig {
|
|
905
976
|
/** The name of the index */
|
|
@@ -991,7 +1062,11 @@ export interface IndexStatistics {
|
|
|
991
1062
|
export interface JobFailureInfo {
|
|
992
1063
|
phase?: string
|
|
993
1064
|
message?: string
|
|
1065
|
+
/** User-code traceback, possibly truncated by the server. */
|
|
1066
|
+
traceback?: string
|
|
994
1067
|
retryable?: boolean
|
|
1068
|
+
/** Isolated SQL job that raised this failure, when supplied by the server. */
|
|
1069
|
+
sqlJobId?: string
|
|
995
1070
|
}
|
|
996
1071
|
|
|
997
1072
|
/** A row from `Connection.listJobs`: one server-side job. */
|
|
@@ -1158,6 +1233,63 @@ export interface OptimizeStats {
|
|
|
1158
1233
|
/** Create a permutation builder for the given table */
|
|
1159
1234
|
export declare function permutationBuilder(table: Table): PermutationBuilder
|
|
1160
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Options for `Table.refreshColumn` and `Table.refreshColumnAsync`. Every
|
|
1238
|
+
* option is LanceDB Enterprise only; a LanceDB Embedded refresh ignores
|
|
1239
|
+
* `batchSize`, `gpuClass` and `gpuCount` and rejects the rest, including
|
|
1240
|
+
* `resourceBudget`.
|
|
1241
|
+
*/
|
|
1242
|
+
export interface RefreshColumnOptions {
|
|
1243
|
+
/** Only refresh the rows matching this SQL filter. */
|
|
1244
|
+
where?: string
|
|
1245
|
+
/** Maximum rows per Function call; must be greater than zero. */
|
|
1246
|
+
batchSize?: number
|
|
1247
|
+
/**
|
|
1248
|
+
* Row-count threshold for publishing completed Function split ranges.
|
|
1249
|
+
* Must be a positive safe integer. Omit for whole-fragment publication.
|
|
1250
|
+
* Actual publications can be larger; remaining rows publish at completion.
|
|
1251
|
+
* Requires LanceDB Enterprise with non-Blob Function outputs.
|
|
1252
|
+
*/
|
|
1253
|
+
publicationIntervalRows?: number
|
|
1254
|
+
/**
|
|
1255
|
+
* Override the registered Function's maximum concurrent user-code calls
|
|
1256
|
+
* for this logical execution.
|
|
1257
|
+
*/
|
|
1258
|
+
maxConcurrency?: number
|
|
1259
|
+
/** GPU class for Function workers. */
|
|
1260
|
+
gpuClass?: string
|
|
1261
|
+
/**
|
|
1262
|
+
* Complete aggregate CPU and memory budget for a registered Function
|
|
1263
|
+
* refresh. `gpuCount` inside the budget defaults to zero.
|
|
1264
|
+
*/
|
|
1265
|
+
resourceBudget?: FunctionWorkerResourceBudget
|
|
1266
|
+
/** Positive aggregate GPU budget for Function workers. */
|
|
1267
|
+
gpuCount?: number
|
|
1268
|
+
/**
|
|
1269
|
+
* `"fail"` (default) stops on a row error; `"skip"` writes null and
|
|
1270
|
+
* records the error, subject to the failure limits.
|
|
1271
|
+
*/
|
|
1272
|
+
errorPolicy?: string
|
|
1273
|
+
/**
|
|
1274
|
+
* Under a skip policy, fail the job once more than this share of rows
|
|
1275
|
+
* (0 to 1) has failed.
|
|
1276
|
+
*/
|
|
1277
|
+
maxFailedFraction?: number
|
|
1278
|
+
/**
|
|
1279
|
+
* Under a skip policy, fail the job once more than this many rows have
|
|
1280
|
+
* failed.
|
|
1281
|
+
*/
|
|
1282
|
+
maxFailedRows?: number
|
|
1283
|
+
/** Deadline for one Function call, in seconds. */
|
|
1284
|
+
rowTimeoutSeconds?: number
|
|
1285
|
+
/** Deadline for Function initialization, in seconds. */
|
|
1286
|
+
initTimeoutSeconds?: number
|
|
1287
|
+
/** Worker count for an expression column; Function columns reject it. */
|
|
1288
|
+
numWorkers?: number
|
|
1289
|
+
/** Cap on executor processes per Function worker. */
|
|
1290
|
+
maxExecutorProcessesPerWorker?: number
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1161
1293
|
export interface RefreshColumnResult {
|
|
1162
1294
|
rowsFilled: number
|
|
1163
1295
|
version: number
|
package/dist/native.js
CHANGED
|
@@ -76,8 +76,8 @@ function requireNative() {
|
|
|
76
76
|
try {
|
|
77
77
|
const binding = require('@lancedb/lancedb-android-arm64');
|
|
78
78
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
|
|
79
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
79
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
}
|
|
82
82
|
return binding;
|
|
83
83
|
}
|
|
@@ -95,8 +95,8 @@ function requireNative() {
|
|
|
95
95
|
try {
|
|
96
96
|
const binding = require('@lancedb/lancedb-android-arm-eabi');
|
|
97
97
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
|
|
98
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
99
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
100
|
}
|
|
101
101
|
return binding;
|
|
102
102
|
}
|
|
@@ -120,8 +120,8 @@ function requireNative() {
|
|
|
120
120
|
try {
|
|
121
121
|
const binding = require('@lancedb/lancedb-win32-x64-gnu');
|
|
122
122
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
|
|
123
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
124
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
125
125
|
}
|
|
126
126
|
return binding;
|
|
127
127
|
}
|
|
@@ -139,8 +139,8 @@ function requireNative() {
|
|
|
139
139
|
try {
|
|
140
140
|
const binding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
141
141
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
|
|
142
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
143
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
144
144
|
}
|
|
145
145
|
return binding;
|
|
146
146
|
}
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
161
161
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
|
|
162
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
164
|
}
|
|
165
165
|
return binding;
|
|
166
166
|
}
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@lancedb/lancedb-win32-arm64-msvc');
|
|
180
180
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
|
|
181
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
183
183
|
}
|
|
184
184
|
return binding;
|
|
185
185
|
}
|
|
@@ -201,8 +201,8 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require('@lancedb/lancedb-darwin-universal');
|
|
203
203
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
|
|
204
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
205
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
}
|
|
207
207
|
return binding;
|
|
208
208
|
}
|
|
@@ -219,8 +219,8 @@ function requireNative() {
|
|
|
219
219
|
try {
|
|
220
220
|
const binding = require('@lancedb/lancedb-darwin-x64');
|
|
221
221
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
|
|
222
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
224
224
|
}
|
|
225
225
|
return binding;
|
|
226
226
|
}
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@lancedb/lancedb-darwin-arm64');
|
|
240
240
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
|
|
241
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
}
|
|
244
244
|
return binding;
|
|
245
245
|
}
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@lancedb/lancedb-freebsd-x64');
|
|
264
264
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
|
|
265
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
267
267
|
}
|
|
268
268
|
return binding;
|
|
269
269
|
}
|
|
@@ -281,8 +281,8 @@ function requireNative() {
|
|
|
281
281
|
try {
|
|
282
282
|
const binding = require('@lancedb/lancedb-freebsd-arm64');
|
|
283
283
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
|
|
284
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
285
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
}
|
|
287
287
|
return binding;
|
|
288
288
|
}
|
|
@@ -306,8 +306,8 @@ function requireNative() {
|
|
|
306
306
|
try {
|
|
307
307
|
const binding = require('@lancedb/lancedb-linux-x64-musl');
|
|
308
308
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
|
|
309
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
310
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
311
311
|
}
|
|
312
312
|
return binding;
|
|
313
313
|
}
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
327
327
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
|
|
328
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
330
330
|
}
|
|
331
331
|
return binding;
|
|
332
332
|
}
|
|
@@ -346,8 +346,8 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
348
348
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
|
|
349
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
350
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
}
|
|
352
352
|
return binding;
|
|
353
353
|
}
|
|
@@ -365,8 +365,8 @@ function requireNative() {
|
|
|
365
365
|
try {
|
|
366
366
|
const binding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
367
367
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
|
|
368
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
369
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
370
|
}
|
|
371
371
|
return binding;
|
|
372
372
|
}
|
|
@@ -386,8 +386,8 @@ function requireNative() {
|
|
|
386
386
|
try {
|
|
387
387
|
const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
388
388
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
|
|
389
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
390
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
391
391
|
}
|
|
392
392
|
return binding;
|
|
393
393
|
}
|
|
@@ -405,8 +405,8 @@ function requireNative() {
|
|
|
405
405
|
try {
|
|
406
406
|
const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
407
407
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
|
|
408
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
409
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
410
410
|
}
|
|
411
411
|
return binding;
|
|
412
412
|
}
|
|
@@ -426,8 +426,8 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = require('@lancedb/lancedb-linux-loong64-musl');
|
|
428
428
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
|
|
429
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
431
431
|
}
|
|
432
432
|
return binding;
|
|
433
433
|
}
|
|
@@ -445,8 +445,8 @@ function requireNative() {
|
|
|
445
445
|
try {
|
|
446
446
|
const binding = require('@lancedb/lancedb-linux-loong64-gnu');
|
|
447
447
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
|
|
448
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
449
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
450
450
|
}
|
|
451
451
|
return binding;
|
|
452
452
|
}
|
|
@@ -466,8 +466,8 @@ function requireNative() {
|
|
|
466
466
|
try {
|
|
467
467
|
const binding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
468
468
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
|
|
469
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
470
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
471
471
|
}
|
|
472
472
|
return binding;
|
|
473
473
|
}
|
|
@@ -485,8 +485,8 @@ function requireNative() {
|
|
|
485
485
|
try {
|
|
486
486
|
const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
|
|
487
487
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
|
|
488
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
489
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
490
490
|
}
|
|
491
491
|
return binding;
|
|
492
492
|
}
|
|
@@ -505,8 +505,8 @@ function requireNative() {
|
|
|
505
505
|
try {
|
|
506
506
|
const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
|
|
507
507
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
|
|
508
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
509
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
510
510
|
}
|
|
511
511
|
return binding;
|
|
512
512
|
}
|
|
@@ -524,8 +524,8 @@ function requireNative() {
|
|
|
524
524
|
try {
|
|
525
525
|
const binding = require('@lancedb/lancedb-linux-s390x-gnu');
|
|
526
526
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
|
|
527
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
528
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
529
529
|
}
|
|
530
530
|
return binding;
|
|
531
531
|
}
|
|
@@ -548,8 +548,8 @@ function requireNative() {
|
|
|
548
548
|
try {
|
|
549
549
|
const binding = require('@lancedb/lancedb-openharmony-arm64');
|
|
550
550
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
|
|
551
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
552
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
553
553
|
}
|
|
554
554
|
return binding;
|
|
555
555
|
}
|
|
@@ -567,8 +567,8 @@ function requireNative() {
|
|
|
567
567
|
try {
|
|
568
568
|
const binding = require('@lancedb/lancedb-openharmony-x64');
|
|
569
569
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
|
|
570
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
571
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
572
572
|
}
|
|
573
573
|
return binding;
|
|
574
574
|
}
|
|
@@ -586,8 +586,8 @@ function requireNative() {
|
|
|
586
586
|
try {
|
|
587
587
|
const binding = require('@lancedb/lancedb-openharmony-arm');
|
|
588
588
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
|
|
589
|
-
if (bindingPackageVersion !== '0.42.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.42.0-beta.12' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
590
|
+
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/query.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export interface QueryExecutionOptions {
|
|
|
32
32
|
maxBatchLength?: number;
|
|
33
33
|
/**
|
|
34
34
|
* Timeout for query execution in milliseconds
|
|
35
|
+
*
|
|
36
|
+
* The timeout also covers reading the results, so consuming them slowly can
|
|
37
|
+
* exceed it.
|
|
35
38
|
*/
|
|
36
39
|
timeoutMs?: number;
|
|
37
40
|
/**
|
|
@@ -365,6 +368,11 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
365
368
|
/**
|
|
366
369
|
* Set the initial IVF search effort to a finite value in [0, 1].
|
|
367
370
|
*
|
|
371
|
+
* Efforts 0.1 and 0.25 target empirical mean partition-routing recall of
|
|
372
|
+
* 80% and 90% for L2, cosine and dot through k=100000. The probe budget
|
|
373
|
+
* adapts to the metric and k. Hamming and larger k remain uncalibrated;
|
|
374
|
+
* 100000 is not an API limit. Remote queries also require server support.
|
|
375
|
+
*
|
|
368
376
|
* The default, null, uses Auto (internally 0.5). Zero starts at the caller
|
|
369
377
|
* minimum; one searches all partitions within the caller maximum. Later
|
|
370
378
|
* probing may continue when too few candidates are found.
|
package/dist/query.js
CHANGED
|
@@ -599,6 +599,11 @@ class VectorQuery extends StandardQueryBase {
|
|
|
599
599
|
/**
|
|
600
600
|
* Set the initial IVF search effort to a finite value in [0, 1].
|
|
601
601
|
*
|
|
602
|
+
* Efforts 0.1 and 0.25 target empirical mean partition-routing recall of
|
|
603
|
+
* 80% and 90% for L2, cosine and dot through k=100000. The probe budget
|
|
604
|
+
* adapts to the metric and k. Hamming and larger k remain uncalibrated;
|
|
605
|
+
* 100000 is not an API limit. Remote queries also require server support.
|
|
606
|
+
*
|
|
602
607
|
* The default, null, uses Auto (internally 0.5). Zero starts at the caller
|
|
603
608
|
* minimum; one searches all partitions within the caller maximum. Later
|
|
604
609
|
* probing may continue when too few candidates are found.
|
package/dist/table.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BlobFile, BlobReadOptions } from "./blob";
|
|
|
3
3
|
import { IndexOptions } from "./indices";
|
|
4
4
|
import { Job } from "./job";
|
|
5
5
|
import { MergeInsertBuilder } from "./merge";
|
|
6
|
-
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, FunctionErrors, FunctionErrorsOptions, IndexConfig, IndexStatistics, Branches as NativeBranches, OptimizeStats, RTEStats, RefreshColumnResult, RefreshMaterializedViewResult, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
|
|
6
|
+
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, FunctionErrors, FunctionErrorsOptions, IndexConfig, IndexStatistics, JobFailureInfo, Branches as NativeBranches, OptimizeStats, RTEStats, RefreshColumnOptions, RefreshColumnResult, RefreshMaterializedViewResult, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
|
|
7
7
|
import { AutoQuery, FullTextQuery, Query, TakeQuery, VectorQuery } from "./query";
|
|
8
8
|
import { IntoSql } from "./util";
|
|
9
9
|
export { IndexConfig } from "./native";
|
|
@@ -89,7 +89,30 @@ export interface UpdateOptions {
|
|
|
89
89
|
*/
|
|
90
90
|
where: string;
|
|
91
91
|
}
|
|
92
|
+
/** Per-invocation compaction settings. Values must be safe integers. */
|
|
93
|
+
export interface CompactionOptions {
|
|
94
|
+
/** Positive target rows per output fragment; also affects candidate selection. */
|
|
95
|
+
targetRowsPerFragment?: number;
|
|
96
|
+
/** Positive live-source-row budget across whole tasks; an oversized first task can produce no work. */
|
|
97
|
+
maxSourceRows?: number;
|
|
98
|
+
/** Scanner I/O read-ahead budget in bytes; zero disables byte-based I/O backpressure. */
|
|
99
|
+
ioBufferSize?: number;
|
|
100
|
+
/** Positive scanner batch size in rows. */
|
|
101
|
+
batchSize?: number;
|
|
102
|
+
}
|
|
92
103
|
export interface OptimizeOptions {
|
|
104
|
+
/**
|
|
105
|
+
* Compaction settings for this invocation. Omitted remote values inherit table
|
|
106
|
+
* tuning, then deployment/built-in defaults.
|
|
107
|
+
* Remote tables require a server supporting these SQL options; settings do
|
|
108
|
+
* not change table policy. This is not a runtime or total-memory limit.
|
|
109
|
+
* @example
|
|
110
|
+
* await tbl.optimize({ compactionOptions: {
|
|
111
|
+
* targetRowsPerFragment: 1000, maxSourceRows: 5000,
|
|
112
|
+
* ioBufferSize: 64 * 1024 * 1024, batchSize: 128,
|
|
113
|
+
* } });
|
|
114
|
+
*/
|
|
115
|
+
compactionOptions?: CompactionOptions;
|
|
93
116
|
/**
|
|
94
117
|
* If set then all versions older than the given date
|
|
95
118
|
* be removed. The current version will never be removed.
|
|
@@ -164,6 +187,55 @@ export interface RTEWriteSpec {
|
|
|
164
187
|
/** Default `ShardWriter` configuration recorded in the MemWAL index. */
|
|
165
188
|
writerConfigDefaults?: Record<string, string>;
|
|
166
189
|
}
|
|
190
|
+
/** Exact immutable Function revision attached to a table output. */
|
|
191
|
+
export interface FunctionColumnVersionStatus {
|
|
192
|
+
name: string;
|
|
193
|
+
namespacePath: string[];
|
|
194
|
+
objectId: string;
|
|
195
|
+
location: string;
|
|
196
|
+
version: string;
|
|
197
|
+
manifestDigest: string;
|
|
198
|
+
}
|
|
199
|
+
/** Latest matching refresh Job projected for a Function output. */
|
|
200
|
+
export interface FunctionColumnLastRefreshJob {
|
|
201
|
+
jobId: string;
|
|
202
|
+
state: string;
|
|
203
|
+
automatic?: boolean;
|
|
204
|
+
completedAtMillis?: bigint;
|
|
205
|
+
/** Structured failure details for a failed Job. */
|
|
206
|
+
failure?: JobFailureInfo;
|
|
207
|
+
}
|
|
208
|
+
/** Automatic-refresh projection for a Function output. */
|
|
209
|
+
export interface FunctionColumnAutoRefreshStatus {
|
|
210
|
+
enabled: boolean;
|
|
211
|
+
intervalSeconds?: bigint;
|
|
212
|
+
activeJobId?: string;
|
|
213
|
+
state: "disabled" | "running" | "queued" | "ready" | "up_to_date" | "waiting_interval" | "waiting_backoff" | "blocked" | "unobservable";
|
|
214
|
+
failureStreak: number;
|
|
215
|
+
effectiveCooldownMillis?: bigint;
|
|
216
|
+
blockedReason?: "table_has_mem_wal" | "inputs_not_settled" | "dependency_in_flight" | "table_capacity" | "cancelled" | "preparation_backoff" | "failure_threshold_reached" | "binding_revision_missing";
|
|
217
|
+
nextRunAtMillis: bigint | null;
|
|
218
|
+
nextRunAtReason?: string;
|
|
219
|
+
}
|
|
220
|
+
/** Exact four-way status of one Function output at one table version. */
|
|
221
|
+
export interface FunctionColumnStatus {
|
|
222
|
+
column: string;
|
|
223
|
+
bindingId: string;
|
|
224
|
+
function: FunctionColumnVersionStatus;
|
|
225
|
+
tableVersion: bigint;
|
|
226
|
+
rows: bigint;
|
|
227
|
+
fresh: bigint;
|
|
228
|
+
stale: bigint;
|
|
229
|
+
neverComputed: bigint;
|
|
230
|
+
failed: bigint;
|
|
231
|
+
lastRefreshJob?: FunctionColumnLastRefreshJob;
|
|
232
|
+
/**
|
|
233
|
+
* Newest failed refresh Job. This remains present when `lastRefreshJob`
|
|
234
|
+
* is a later cancellation.
|
|
235
|
+
*/
|
|
236
|
+
lastFailureJob?: FunctionColumnLastRefreshJob;
|
|
237
|
+
autoRefresh: FunctionColumnAutoRefreshStatus;
|
|
238
|
+
}
|
|
167
239
|
/**
|
|
168
240
|
* A Table is a collection of Records in a LanceDB Database.
|
|
169
241
|
*
|
|
@@ -548,10 +620,12 @@ export declare abstract class Table {
|
|
|
548
620
|
* everything else is left as it is. LanceDB Embedded only: in LanceDB
|
|
549
621
|
* Enterprise a refresh runs as a server job, through {@link Table#refreshColumnAsync}.
|
|
550
622
|
* @param {string} column The name of the computed column to fill.
|
|
623
|
+
* @param {RefreshColumnOptions} options Refresh options, all LanceDB
|
|
624
|
+
* Enterprise only; see {@link Table#refreshColumnAsync}.
|
|
551
625
|
* @returns {Promise<RefreshColumnResult>} A promise that resolves to the
|
|
552
626
|
* number of rows filled and the new version number of the table.
|
|
553
627
|
*/
|
|
554
|
-
abstract refreshColumn(column: string): Promise<RefreshColumnResult>;
|
|
628
|
+
abstract refreshColumn(column: string, options?: RefreshColumnOptions): Promise<RefreshColumnResult>;
|
|
555
629
|
/**
|
|
556
630
|
* Like {@link Table#refreshColumn}, but returns a handle to the refresh
|
|
557
631
|
* job instead of blocking until it completes.
|
|
@@ -565,14 +639,48 @@ export declare abstract class Table {
|
|
|
565
639
|
* than failing the job. In LanceDB Embedded the job runs in-process; in
|
|
566
640
|
* LanceDB Enterprise it is the server's backfill job.
|
|
567
641
|
* @param {string} column The name of the computed column to fill.
|
|
642
|
+
* @param {RefreshColumnOptions} options Refresh options, mirroring the SQL
|
|
643
|
+
* `REFRESH COLUMN ... WHERE ... WITH (...)` form: `where` narrows the rows,
|
|
644
|
+
* `errorPolicy`, `maxFailedFraction`, `maxFailedRows`, `rowTimeoutSeconds`
|
|
645
|
+
* and `initTimeoutSeconds` govern failing rows. `batchSize`, `gpuClass`,
|
|
646
|
+
* `maxConcurrency`, `resourceBudget` and
|
|
647
|
+
* `maxExecutorProcessesPerWorker` size registered Function refreshes.
|
|
648
|
+
* `maxConcurrency` overrides the registered default for this logical
|
|
649
|
+
* execution only and is a positive integer; it is not an account-wide
|
|
650
|
+
* quota. A `resourceBudget` requires `cpuMillis` and
|
|
651
|
+
* `memoryBytes`; its `gpuCount` defaults to zero for a CPU-only Function.
|
|
652
|
+
* The budget applies only to this explicit refresh and does not configure
|
|
653
|
+
* a later automatic refresh.
|
|
654
|
+
* `gpuCount` at the top level is the shorthand that preserves the
|
|
655
|
+
* deployment defaults for CPU and memory, and cannot be combined with
|
|
656
|
+
* `resourceBudget`. `numWorkers` applies only to expression columns; use
|
|
657
|
+
* `resourceBudget` for registered Functions. All are LanceDB Enterprise
|
|
658
|
+
* only; a LanceDB Embedded refresh rejects every option other than
|
|
659
|
+
* `batchSize`, `gpuClass` and `gpuCount`.
|
|
660
|
+
* `publicationIntervalRows` opts into publishing completed Function split
|
|
661
|
+
* ranges once their accumulated unpublished rows reach the threshold.
|
|
662
|
+
* It must be a positive safe integer and requires non-Blob Function outputs.
|
|
663
|
+
* Omit it for whole-fragment publication. Publications can exceed the
|
|
664
|
+
* threshold, and remaining rows publish at completion.
|
|
568
665
|
* @example
|
|
569
666
|
* ```ts
|
|
570
|
-
* const job = await table.refreshColumnAsync("
|
|
667
|
+
* const job = await table.refreshColumnAsync("embedding", {
|
|
668
|
+
* where: "published_at > '2026-01-01'",
|
|
669
|
+
* resourceBudget: {
|
|
670
|
+
* cpuMillis: 8000,
|
|
671
|
+
* memoryBytes: 16 * 1024 ** 3,
|
|
672
|
+
* },
|
|
673
|
+
* maxConcurrency: 4,
|
|
674
|
+
* publicationIntervalRows: 10000,
|
|
675
|
+
* errorPolicy: "skip",
|
|
676
|
+
* maxFailedFraction: 0.01,
|
|
677
|
+
* rowTimeoutSeconds: 30,
|
|
678
|
+
* });
|
|
571
679
|
* await job.wait();
|
|
572
680
|
* console.log(await job.status()); // "finished"
|
|
573
681
|
* ```
|
|
574
682
|
*/
|
|
575
|
-
abstract refreshColumnAsync(column: string): Promise<Job>;
|
|
683
|
+
abstract refreshColumnAsync(column: string, options?: RefreshColumnOptions): Promise<Job>;
|
|
576
684
|
/**
|
|
577
685
|
* The per-row errors Function refreshes recorded on this table.
|
|
578
686
|
*
|
|
@@ -591,6 +699,24 @@ export declare abstract class Table {
|
|
|
591
699
|
* ```
|
|
592
700
|
*/
|
|
593
701
|
abstract functionErrors(options?: FunctionErrorsOptions): Promise<FunctionErrors>;
|
|
702
|
+
/**
|
|
703
|
+
* Return exact freshness status for Function-backed output columns.
|
|
704
|
+
*
|
|
705
|
+
* All results describe one server table version. Omit `column` for every
|
|
706
|
+
* Function output. Rows already failed remain visible and do not prevent
|
|
707
|
+
* `waitFresh` from completing. A handle pinned to an exact version requests
|
|
708
|
+
* that version; a latest handle retains normal read-freshness behavior.
|
|
709
|
+
*/
|
|
710
|
+
abstract functionColumnStatuses(column?: string): Promise<FunctionColumnStatus[]>;
|
|
711
|
+
/** Return exact freshness status for one Function-backed output column. */
|
|
712
|
+
abstract functionColumnStatus(column: string): Promise<FunctionColumnStatus>;
|
|
713
|
+
/**
|
|
714
|
+
* Poll until no stale or never-computed rows remain.
|
|
715
|
+
*
|
|
716
|
+
* Only HTTP 503 with the exact finalization-pending error code is retried;
|
|
717
|
+
* every other error propagates. Failed rows do not block completion.
|
|
718
|
+
*/
|
|
719
|
+
abstract waitFresh(column: string, timeoutSeconds?: number): Promise<FunctionColumnStatus>;
|
|
594
720
|
/**
|
|
595
721
|
* Recompute this table's contents from its materialized-view definition.
|
|
596
722
|
*
|
|
@@ -871,6 +997,15 @@ export declare abstract class Table {
|
|
|
871
997
|
* optimize should be run frequently. A good rule of thumb is to run optimize if
|
|
872
998
|
* you have added or modified 100,000 or more records or run more than 20 data
|
|
873
999
|
* modification operations.
|
|
1000
|
+
*
|
|
1001
|
+
* On a LanceDB Enterprise (remote) table, only compaction is currently
|
|
1002
|
+
* supported. Pruning old versions and index optimization are silently
|
|
1003
|
+
* skipped there instead of being attempted, so this call resolves
|
|
1004
|
+
* successfully, with zeroed pruning statistics, once the compaction job
|
|
1005
|
+
* has been submitted; it does not wait for that job to finish.
|
|
1006
|
+
* `compactionOptions` can tune the four per-job settings documented in
|
|
1007
|
+
* {@link CompactionOptions}. Older-server errors are propagated without
|
|
1008
|
+
* retrying with the settings removed.
|
|
874
1009
|
*/
|
|
875
1010
|
abstract optimize(options?: Partial<OptimizeOptions>): Promise<OptimizeStats>;
|
|
876
1011
|
/**
|
|
@@ -982,9 +1117,12 @@ export declare class LocalTable extends Table {
|
|
|
982
1117
|
addColumns(newColumnTransforms: AddColumnsSql[] | Field | Field[] | Schema | {
|
|
983
1118
|
computed: AddColumnsSql[];
|
|
984
1119
|
}): Promise<AddColumnsResult>;
|
|
985
|
-
refreshColumn(column: string): Promise<RefreshColumnResult>;
|
|
986
|
-
refreshColumnAsync(column: string): Promise<Job>;
|
|
1120
|
+
refreshColumn(column: string, options?: RefreshColumnOptions): Promise<RefreshColumnResult>;
|
|
1121
|
+
refreshColumnAsync(column: string, options?: RefreshColumnOptions): Promise<Job>;
|
|
987
1122
|
functionErrors(options?: FunctionErrorsOptions): Promise<FunctionErrors>;
|
|
1123
|
+
functionColumnStatuses(column?: string): Promise<FunctionColumnStatus[]>;
|
|
1124
|
+
functionColumnStatus(column: string): Promise<FunctionColumnStatus>;
|
|
1125
|
+
waitFresh(column: string, timeoutSeconds?: number): Promise<FunctionColumnStatus>;
|
|
988
1126
|
refreshMaterializedView(sourceVersion?: number, full?: boolean): Promise<RefreshMaterializedViewResult>;
|
|
989
1127
|
materializedViewDefinition(): Promise<string>;
|
|
990
1128
|
alterColumns(columnAlterations: ColumnAlteration[]): Promise<AlterColumnsResult>;
|
package/dist/table.js
CHANGED
|
@@ -276,16 +276,26 @@ class LocalTable extends Table {
|
|
|
276
276
|
}
|
|
277
277
|
throw new Error("Invalid input type for addColumns");
|
|
278
278
|
}
|
|
279
|
-
async refreshColumn(column) {
|
|
280
|
-
return await this.inner.refreshColumn(column);
|
|
279
|
+
async refreshColumn(column, options) {
|
|
280
|
+
return await this.inner.refreshColumn(column, options);
|
|
281
281
|
}
|
|
282
|
-
async refreshColumnAsync(column) {
|
|
283
|
-
return new job_1.Job(await this.inner.refreshColumnAsync(column));
|
|
282
|
+
async refreshColumnAsync(column, options) {
|
|
283
|
+
return new job_1.Job(await this.inner.refreshColumnAsync(column, options));
|
|
284
284
|
}
|
|
285
285
|
async functionErrors(options) {
|
|
286
286
|
(0, materialized_view_1.validateNonNegativeInteger)(options?.limit, "limit");
|
|
287
287
|
return await this.inner.functionErrors(options);
|
|
288
288
|
}
|
|
289
|
+
async functionColumnStatuses(column) {
|
|
290
|
+
return (await this.inner.functionColumnStatuses(column));
|
|
291
|
+
}
|
|
292
|
+
async functionColumnStatus(column) {
|
|
293
|
+
return (await this.inner.functionColumnStatus(column));
|
|
294
|
+
}
|
|
295
|
+
async waitFresh(column, timeoutSeconds) {
|
|
296
|
+
(0, materialized_view_1.validateNonNegativeInteger)(timeoutSeconds, "timeoutSeconds");
|
|
297
|
+
return (await this.inner.waitForFunctionColumn(column, timeoutSeconds));
|
|
298
|
+
}
|
|
289
299
|
async refreshMaterializedView(sourceVersion, full) {
|
|
290
300
|
return await this.inner.refreshMaterializedView(sourceVersion, full);
|
|
291
301
|
}
|
|
@@ -385,7 +395,20 @@ class LocalTable extends Table {
|
|
|
385
395
|
return this.inner.currentBranch() ?? null;
|
|
386
396
|
}
|
|
387
397
|
async optimize(options) {
|
|
388
|
-
|
|
398
|
+
// JavaScript callers can supply extra keys that TypeScript would reject.
|
|
399
|
+
// Refuse them before the native binding can silently discard a work limit.
|
|
400
|
+
const supported = new Set([
|
|
401
|
+
"targetRowsPerFragment",
|
|
402
|
+
"maxSourceRows",
|
|
403
|
+
"ioBufferSize",
|
|
404
|
+
"batchSize",
|
|
405
|
+
]);
|
|
406
|
+
for (const key of Object.keys(options?.compactionOptions ?? {})) {
|
|
407
|
+
if (!supported.has(key)) {
|
|
408
|
+
throw new Error(`Unsupported compaction option: ${key}`);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return await this.inner.optimize(options?.cleanupOlderThan?.getTime(), options?.deleteUnverified, options?.compactionOptions);
|
|
389
412
|
}
|
|
390
413
|
async listIndices() {
|
|
391
414
|
return await this.inner.listIndices();
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.42.0-beta.
|
|
14
|
+
"version": "0.42.0-beta.12",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
"reflect-metadata": "^0.2.2"
|
|
110
110
|
},
|
|
111
111
|
"optionalDependencies": {
|
|
112
|
-
"@huggingface/transformers": "3.
|
|
112
|
+
"@huggingface/transformers": "4.3.2",
|
|
113
113
|
"openai": "4.29.2",
|
|
114
|
-
"@lancedb/lancedb-darwin-arm64": "0.42.0-beta.
|
|
115
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.42.0-beta.
|
|
116
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.42.0-beta.
|
|
117
|
-
"@lancedb/lancedb-linux-x64-musl": "0.42.0-beta.
|
|
118
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.42.0-beta.
|
|
119
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.42.0-beta.
|
|
120
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.42.0-beta.
|
|
114
|
+
"@lancedb/lancedb-darwin-arm64": "0.42.0-beta.12",
|
|
115
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.42.0-beta.12",
|
|
116
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.42.0-beta.12",
|
|
117
|
+
"@lancedb/lancedb-linux-x64-musl": "0.42.0-beta.12",
|
|
118
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.42.0-beta.12",
|
|
119
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.42.0-beta.12",
|
|
120
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.42.0-beta.12"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"@types/node": ">=22",
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -47,10 +47,3 @@ minimumReleaseAgeExclude:
|
|
|
47
47
|
- js-yaml@4.3.1
|
|
48
48
|
- tar@7.5.21
|
|
49
49
|
- '@opentelemetry/core@2.8.0'
|
|
50
|
-
|
|
51
|
-
# @huggingface/transformers pins sharp ^0.33.5 and no released version has moved
|
|
52
|
-
# past ^0.34.5, all of which inherit the libvips CVEs in GHSA-f88m-g3jw-g9cj.
|
|
53
|
-
# Force the patched line. sharp is only reached by transformers' image pipeline,
|
|
54
|
-
# which LanceDB's text embedding function never uses.
|
|
55
|
-
overrides:
|
|
56
|
-
sharp: ^0.35.4
|