@lancedb/lancedb 0.32.0-beta.2 → 0.32.0-beta.3
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/index.d.ts +2 -2
- package/dist/indices.d.ts +7 -0
- package/dist/indices.js +1 -1
- package/dist/native.d.ts +6 -4
- package/dist/native.js +52 -52
- package/dist/query.d.ts +4 -1
- package/dist/query.js +6 -3
- package/dist/sanitize.js +4 -3
- package/dist/table.d.ts +74 -0
- package/dist/table.js +16 -0
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatist
|
|
|
9
9
|
export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
10
10
|
export { Connection, CreateTableOptions, TableNamesOptions, OpenTableOptions, ListNamespacesOptions, CreateNamespaceOptions, DropNamespaceOptions, ListNamespacesResponse, CreateNamespaceResponse, DropNamespaceResponse, DescribeNamespaceResponse, RenameTableOptions, } from "./connection";
|
|
11
11
|
export { Session } from "./native.js";
|
|
12
|
-
export { ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, QueryExecutionOptions, ColumnOrdering, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, BooleanQuery, FullTextQueryType, Operator, Occur, } from "./query";
|
|
12
|
+
export { ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, AnalyzePlanDistributedMetrics, QueryExecutionOptions, ColumnOrdering, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, BooleanQuery, FullTextQueryType, Operator, Occur, } from "./query";
|
|
13
13
|
export { Index, IndexOptions, IvfPqOptions, IvfRqOptions, IvfFlatOptions, HnswPqOptions, HnswSqOptions, FtsOptions, BaseTokenizer, } from "./indices";
|
|
14
|
-
export { Table, Branches, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, LsmWriteSpec, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
14
|
+
export { Table, Branches, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, MergeBlocker, BranchDiff, MergePreview, MergeBranchResult, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, LsmWriteSpec, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
15
15
|
export { HeaderProvider, StaticHeaderProvider, OAuthHeaderProvider, TokenResponse, } from "./header";
|
|
16
16
|
export { OAuthConfig, OAuthFlowType } from "./oauth";
|
|
17
17
|
export { MergeInsertBuilder, WriteExecutionOptions } from "./merge";
|
package/dist/indices.d.ts
CHANGED
|
@@ -520,6 +520,13 @@ export interface FtsOptions {
|
|
|
520
520
|
* whether to only index the prefix of the token for ngram tokenizer
|
|
521
521
|
*/
|
|
522
522
|
prefixOnly?: boolean;
|
|
523
|
+
/**
|
|
524
|
+
* Number of documents per compressed posting block.
|
|
525
|
+
*
|
|
526
|
+
* The default is 128. Supported values are 128 and 256. A value of 256 uses
|
|
527
|
+
* the experimental FTS V3 format and may introduce breaking changes.
|
|
528
|
+
*/
|
|
529
|
+
blockSize?: 128 | 256;
|
|
523
530
|
}
|
|
524
531
|
export declare class Index {
|
|
525
532
|
private readonly inner;
|
package/dist/indices.js
CHANGED
|
@@ -136,7 +136,7 @@ class Index {
|
|
|
136
136
|
* You can combine filters with full text search.
|
|
137
137
|
*/
|
|
138
138
|
static fts(options) {
|
|
139
|
-
return new Index(native_1.Index.fts(options?.withPosition, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly));
|
|
139
|
+
return new Index(native_1.Index.fts(options?.withPosition, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly, options?.blockSize));
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
*
|
package/dist/native.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export declare class Branches {
|
|
|
11
11
|
create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null): Promise<Table>
|
|
12
12
|
checkout(name: string, version?: number | undefined | null): Promise<Table>
|
|
13
13
|
delete(name: string): Promise<void>
|
|
14
|
+
diff(fromBranch: string): Promise<Record<string, unknown>>
|
|
15
|
+
merge(fromBranch: string, dryRun?: boolean | undefined | null): Promise<Record<string, unknown>>
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export declare class Connection {
|
|
@@ -61,7 +63,7 @@ export declare class Index {
|
|
|
61
63
|
static bitmap(): Index
|
|
62
64
|
static labelList(): Index
|
|
63
65
|
static fm(): Index
|
|
64
|
-
static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Index
|
|
66
|
+
static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null, blockSize?: number | undefined | null): Index
|
|
65
67
|
static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
|
|
66
68
|
static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
|
|
67
69
|
}
|
|
@@ -154,7 +156,7 @@ export declare class Query {
|
|
|
154
156
|
outputSchema(): Promise<Buffer>
|
|
155
157
|
execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
|
|
156
158
|
explainPlan(verbose: boolean): Promise<string>
|
|
157
|
-
analyzePlan(): Promise<string>
|
|
159
|
+
analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
/** Typescript-style Async Iterator over RecordBatches */
|
|
@@ -276,7 +278,7 @@ export declare class TakeQuery {
|
|
|
276
278
|
outputSchema(): Promise<Buffer>
|
|
277
279
|
execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
|
|
278
280
|
explainPlan(verbose: boolean): Promise<string>
|
|
279
|
-
analyzePlan(): Promise<string>
|
|
281
|
+
analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
|
|
280
282
|
}
|
|
281
283
|
|
|
282
284
|
export declare class VectorQuery {
|
|
@@ -305,7 +307,7 @@ export declare class VectorQuery {
|
|
|
305
307
|
outputSchema(): Promise<Buffer>
|
|
306
308
|
execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
|
|
307
309
|
explainPlan(verbose: boolean): Promise<string>
|
|
308
|
-
analyzePlan(): Promise<string>
|
|
310
|
+
analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
|
|
309
311
|
}
|
|
310
312
|
|
|
311
313
|
export interface AddColumnsResult {
|
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.32.0-beta.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
79
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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.32.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.32.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.32.0-beta.3' && 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.32.0-beta.3 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
|
@@ -19,6 +19,7 @@ export interface QueryExecutionOptions {
|
|
|
19
19
|
*/
|
|
20
20
|
timeoutMs?: number;
|
|
21
21
|
}
|
|
22
|
+
export type AnalyzePlanDistributedMetrics = "aggregate" | "per_worker" | "full";
|
|
22
23
|
export interface ColumnOrdering {
|
|
23
24
|
columnName: string;
|
|
24
25
|
ascending?: boolean;
|
|
@@ -158,9 +159,11 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
158
159
|
* KNNVectorDistance: metric=l2, metrics=[output_rows=1, elapsed_compute=114.333µs, output_batches=1]
|
|
159
160
|
* LanceScan: uri=/path/to/data, projection=[vector], row_id=true, row_addr=false, ordered=false, metrics=[output_rows=1, elapsed_compute=103.626µs, bytes_read=549, iops=2, requests=2]
|
|
160
161
|
*
|
|
162
|
+
* @param distributedMetrics - How distributed worker metrics are displayed for remote query plans.
|
|
163
|
+
* Defaults to `"aggregate"`.
|
|
161
164
|
* @returns A query execution plan with runtime metrics for each step.
|
|
162
165
|
*/
|
|
163
|
-
analyzePlan(): Promise<string>;
|
|
166
|
+
analyzePlan(distributedMetrics?: AnalyzePlanDistributedMetrics): Promise<string>;
|
|
164
167
|
/**
|
|
165
168
|
* Returns the schema of the output that will be returned by this query.
|
|
166
169
|
*
|
package/dist/query.js
CHANGED
|
@@ -231,14 +231,17 @@ class QueryBase {
|
|
|
231
231
|
* KNNVectorDistance: metric=l2, metrics=[output_rows=1, elapsed_compute=114.333µs, output_batches=1]
|
|
232
232
|
* LanceScan: uri=/path/to/data, projection=[vector], row_id=true, row_addr=false, ordered=false, metrics=[output_rows=1, elapsed_compute=103.626µs, bytes_read=549, iops=2, requests=2]
|
|
233
233
|
*
|
|
234
|
+
* @param distributedMetrics - How distributed worker metrics are displayed for remote query plans.
|
|
235
|
+
* Defaults to `"aggregate"`.
|
|
234
236
|
* @returns A query execution plan with runtime metrics for each step.
|
|
235
237
|
*/
|
|
236
|
-
async analyzePlan() {
|
|
238
|
+
async analyzePlan(distributedMetrics) {
|
|
239
|
+
const distributedMetricsMode = distributedMetrics ?? "aggregate";
|
|
237
240
|
if (this.inner instanceof Promise) {
|
|
238
|
-
return this.inner.then((inner) => inner.analyzePlan());
|
|
241
|
+
return this.inner.then((inner) => inner.analyzePlan(distributedMetricsMode));
|
|
239
242
|
}
|
|
240
243
|
else {
|
|
241
|
-
return this.inner.analyzePlan();
|
|
244
|
+
return this.inner.analyzePlan(distributedMetricsMode);
|
|
242
245
|
}
|
|
243
246
|
}
|
|
244
247
|
/**
|
package/dist/sanitize.js
CHANGED
|
@@ -178,9 +178,10 @@ function sanitizeMap(typeLike) {
|
|
|
178
178
|
if (!("keysSorted" in typeLike) || typeof typeLike.keysSorted !== "boolean") {
|
|
179
179
|
throw Error("Expected a Map type to have a `keysSorted` property");
|
|
180
180
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
if (typeLike.children.length !== 1) {
|
|
182
|
+
throw Error("Expected a Map type to have exactly one child");
|
|
183
|
+
}
|
|
184
|
+
return new arrow_1.Map_(sanitizeField(typeLike.children[0]), typeLike.keysSorted);
|
|
184
185
|
}
|
|
185
186
|
function sanitizeDuration(typeLike) {
|
|
186
187
|
if (!("unit" in typeLike) || typeof typeLike.unit !== "number") {
|
package/dist/table.d.ts
CHANGED
|
@@ -808,6 +808,68 @@ export interface FieldMetadataUpdate {
|
|
|
808
808
|
/** If true, replace the field's entire metadata map instead of merging. */
|
|
809
809
|
replace?: boolean;
|
|
810
810
|
}
|
|
811
|
+
/** Summary of a column in a branch diff. */
|
|
812
|
+
export interface BranchColumnSummary {
|
|
813
|
+
name: string;
|
|
814
|
+
dataType: string;
|
|
815
|
+
nullable: boolean;
|
|
816
|
+
}
|
|
817
|
+
/** A column whose definition differs between main and the branch. */
|
|
818
|
+
export interface BranchColumnChange {
|
|
819
|
+
name: string;
|
|
820
|
+
main: BranchColumnSummary;
|
|
821
|
+
branch: BranchColumnSummary;
|
|
822
|
+
}
|
|
823
|
+
/** Summary of an index in a branch diff. */
|
|
824
|
+
export interface BranchIndexSummary {
|
|
825
|
+
indexName: string;
|
|
826
|
+
columns: string[];
|
|
827
|
+
indexType?: string;
|
|
828
|
+
status: string;
|
|
829
|
+
}
|
|
830
|
+
/** Row-level comparison between main and the branch. */
|
|
831
|
+
export interface BranchRowCountSummary {
|
|
832
|
+
unchanged: number;
|
|
833
|
+
newOnBase: number;
|
|
834
|
+
newOnBranch: number;
|
|
835
|
+
staleRecompute: number;
|
|
836
|
+
inputsChanged: number;
|
|
837
|
+
deltaAvailable: boolean;
|
|
838
|
+
}
|
|
839
|
+
/** A reason why a branch cannot currently be merged. */
|
|
840
|
+
export interface MergeBlocker {
|
|
841
|
+
code: string;
|
|
842
|
+
message: string;
|
|
843
|
+
}
|
|
844
|
+
/** Read-only comparison of a branch against main. */
|
|
845
|
+
export interface BranchDiff {
|
|
846
|
+
fromBranch: string;
|
|
847
|
+
parentVersion: number;
|
|
848
|
+
mainVersion: number;
|
|
849
|
+
branchVersion: number;
|
|
850
|
+
baseMoved: boolean;
|
|
851
|
+
rowCountMain: number;
|
|
852
|
+
rowCountBranch: number;
|
|
853
|
+
rowSummary: BranchRowCountSummary;
|
|
854
|
+
addedColumns: BranchColumnSummary[];
|
|
855
|
+
removedColumns: BranchColumnSummary[];
|
|
856
|
+
changedColumns: BranchColumnChange[];
|
|
857
|
+
addedIndexes: BranchIndexSummary[];
|
|
858
|
+
removedIndexes: BranchIndexSummary[];
|
|
859
|
+
mergeable: boolean;
|
|
860
|
+
mergeBlockers: MergeBlocker[];
|
|
861
|
+
}
|
|
862
|
+
/** Changes that would be, or were, promoted by a branch merge. */
|
|
863
|
+
export interface MergePreview {
|
|
864
|
+
promotedColumns: string[];
|
|
865
|
+
}
|
|
866
|
+
/** Result of previewing or attempting a branch merge. */
|
|
867
|
+
export interface MergeBranchResult {
|
|
868
|
+
status: "ready" | "rejected" | "notImplemented" | "merged" | "unknown";
|
|
869
|
+
diff: BranchDiff;
|
|
870
|
+
preview: MergePreview;
|
|
871
|
+
mainVersionAfter?: number;
|
|
872
|
+
}
|
|
811
873
|
/**
|
|
812
874
|
* Branch manager for a {@link Table}.
|
|
813
875
|
*
|
|
@@ -841,4 +903,16 @@ export declare class Branches {
|
|
|
841
903
|
checkout(name: string, version?: number): Promise<Table>;
|
|
842
904
|
/** Delete a branch. */
|
|
843
905
|
delete(name: string): Promise<void>;
|
|
906
|
+
/** Compare a branch against main without modifying either branch. */
|
|
907
|
+
diff(fromBranch: string): Promise<BranchDiff>;
|
|
908
|
+
/**
|
|
909
|
+
* Merge a branch into main.
|
|
910
|
+
*
|
|
911
|
+
* Set `dryRun` to `true` to preview the merge. A rejected merge resolves
|
|
912
|
+
* with `status: "rejected"` instead of throwing.
|
|
913
|
+
*
|
|
914
|
+
* @param fromBranch Branch to merge from.
|
|
915
|
+
* @param dryRun When true, only preview the merge. Defaults to false.
|
|
916
|
+
*/
|
|
917
|
+
merge(fromBranch: string, dryRun?: boolean): Promise<MergeBranchResult>;
|
|
844
918
|
}
|
package/dist/table.js
CHANGED
|
@@ -433,5 +433,21 @@ class Branches {
|
|
|
433
433
|
async delete(name) {
|
|
434
434
|
return await this.#inner.delete(name);
|
|
435
435
|
}
|
|
436
|
+
/** Compare a branch against main without modifying either branch. */
|
|
437
|
+
async diff(fromBranch) {
|
|
438
|
+
return (await this.#inner.diff(fromBranch));
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Merge a branch into main.
|
|
442
|
+
*
|
|
443
|
+
* Set `dryRun` to `true` to preview the merge. A rejected merge resolves
|
|
444
|
+
* with `status: "rejected"` instead of throwing.
|
|
445
|
+
*
|
|
446
|
+
* @param fromBranch Branch to merge from.
|
|
447
|
+
* @param dryRun When true, only preview the merge. Defaults to false.
|
|
448
|
+
*/
|
|
449
|
+
async merge(fromBranch, dryRun = false) {
|
|
450
|
+
return (await this.#inner.merge(fromBranch, dryRun));
|
|
451
|
+
}
|
|
436
452
|
}
|
|
437
453
|
exports.Branches = Branches;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.32.0-beta.
|
|
14
|
+
"version": "0.32.0-beta.3",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"optionalDependencies": {
|
|
107
107
|
"@huggingface/transformers": "3.0.2",
|
|
108
108
|
"openai": "4.29.2",
|
|
109
|
-
"@lancedb/lancedb-darwin-arm64": "0.32.0-beta.
|
|
110
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.32.0-beta.
|
|
111
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.32.0-beta.
|
|
112
|
-
"@lancedb/lancedb-linux-x64-musl": "0.32.0-beta.
|
|
113
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.32.0-beta.
|
|
114
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.32.0-beta.
|
|
115
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.32.0-beta.
|
|
109
|
+
"@lancedb/lancedb-darwin-arm64": "0.32.0-beta.3",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.32.0-beta.3",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.32.0-beta.3",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.32.0-beta.3",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.32.0-beta.3",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.32.0-beta.3",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.32.0-beta.3"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"apache-arrow": ">=15.0.0 <=18.1.0"
|