@lancedb/lancedb 0.38.0-beta.0 → 0.38.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/native.d.ts +92 -0
- package/dist/native.js +52 -52
- package/dist/table.d.ts +115 -3
- package/dist/table.js +24 -0
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import type { BaseTokenizer } from "./indices";
|
|
|
5
5
|
import type { FtsToken } from "./table";
|
|
6
6
|
export { JsHeaderProvider as NativeJsHeaderProvider } from "./native.js";
|
|
7
7
|
export { instrumentLanceDbMetrics } from "./otel";
|
|
8
|
-
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
8
|
+
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, RefreshColumnResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
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 { Job, JobDescription, JobFailureInfo, JobInfo, Session, } from "./native.js";
|
|
12
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, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, MergeBlocker, BranchDiff, MergePreview, MergeBranchResult, 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, LsmStats, BucketStats, GenerationStats, MemtableStats, 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/native.d.ts
CHANGED
|
@@ -281,6 +281,9 @@ export declare class Table {
|
|
|
281
281
|
takeRowIds(rowIds: Array<bigint>): TakeQuery
|
|
282
282
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
283
283
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
284
|
+
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
285
|
+
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
286
|
+
refreshColumnAsync(column: string): Promise<Job>
|
|
284
287
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
285
288
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
286
289
|
updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
|
|
@@ -290,6 +293,10 @@ export declare class Table {
|
|
|
290
293
|
unsetLsmWriteSpec(): Promise<void>
|
|
291
294
|
getLsmWriteSpec(): Promise<LsmWriteSpec | null>
|
|
292
295
|
closeLsmWriters(): Promise<void>
|
|
296
|
+
flushLsm(): Promise<void>
|
|
297
|
+
compactLsm(): Promise<void>
|
|
298
|
+
checkpointLsm(): Promise<void>
|
|
299
|
+
getLsmStats(includeGenerationRows: boolean): Promise<LsmStats | null>
|
|
293
300
|
version(): Promise<number>
|
|
294
301
|
checkout(version: number): Promise<void>
|
|
295
302
|
checkoutTag(tag: string): Promise<void>
|
|
@@ -386,6 +393,45 @@ export interface AlterColumnsResult {
|
|
|
386
393
|
version: number
|
|
387
394
|
}
|
|
388
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Live state of one bucket. A table is N buckets on one node; flattening to a
|
|
398
|
+
* single number hides the one hot bucket that is usually why someone opened
|
|
399
|
+
* this endpoint.
|
|
400
|
+
*/
|
|
401
|
+
export interface BucketStats {
|
|
402
|
+
/** The shard this bucket writes. */
|
|
403
|
+
shardId: string
|
|
404
|
+
/** `"Active"` or `"Sealed"` (drop-table 2PC in flight). */
|
|
405
|
+
status: string
|
|
406
|
+
/** Epoch of the writer that currently owns the shard. */
|
|
407
|
+
writerEpoch: number
|
|
408
|
+
/** Version of the shard manifest these numbers were read from. */
|
|
409
|
+
manifestVersion: number
|
|
410
|
+
/** The generation the active memtable will become. */
|
|
411
|
+
currentGeneration: number
|
|
412
|
+
/** WAL position replay resumes from. */
|
|
413
|
+
replayAfterWalEntryPosition: number
|
|
414
|
+
/**
|
|
415
|
+
* Highest WAL position the writer has seen. The difference against
|
|
416
|
+
* `replayAfterWalEntryPosition` is the WAL lag.
|
|
417
|
+
*/
|
|
418
|
+
walEntryPositionLastSeen: number
|
|
419
|
+
/** Flushed L0 generations not yet merged into the base table. */
|
|
420
|
+
generations: Array<GenerationStats>
|
|
421
|
+
/**
|
|
422
|
+
* Whether a pass owns this bucket's compaction latch right now. Says *a*
|
|
423
|
+
* driver is running, not *whose*, and the latch is held from dispatch —
|
|
424
|
+
* including while the pass queues for a pod-wide compactor permit. Read it
|
|
425
|
+
* as "do not pile on", never as "mine is progressing".
|
|
426
|
+
*/
|
|
427
|
+
compacting: boolean
|
|
428
|
+
/**
|
|
429
|
+
* Oldest first, active last. Absent for a `"Sealed"` bucket, whose
|
|
430
|
+
* in-memory state is torn down.
|
|
431
|
+
*/
|
|
432
|
+
memtables?: Array<MemtableStats>
|
|
433
|
+
}
|
|
434
|
+
|
|
389
435
|
export interface ClientConfig {
|
|
390
436
|
userAgent?: string
|
|
391
437
|
retryConfig?: RetryConfig
|
|
@@ -618,6 +664,19 @@ export interface FtsToken {
|
|
|
618
664
|
position: number
|
|
619
665
|
}
|
|
620
666
|
|
|
667
|
+
/** One flushed L0 generation. */
|
|
668
|
+
export interface GenerationStats {
|
|
669
|
+
/** The generation number. Increases as memtables are sealed into L0. */
|
|
670
|
+
generation: number
|
|
671
|
+
/** On-disk size of the generation. */
|
|
672
|
+
bytes: number
|
|
673
|
+
/**
|
|
674
|
+
* Present only when `includeGenerationRows` was requested. Off by default
|
|
675
|
+
* because each count opens an uncached Lance dataset.
|
|
676
|
+
*/
|
|
677
|
+
rows?: number
|
|
678
|
+
}
|
|
679
|
+
|
|
621
680
|
/** A description of an index currently configured on a column */
|
|
622
681
|
export interface IndexConfig {
|
|
623
682
|
/** The name of the index */
|
|
@@ -753,6 +812,17 @@ export interface ListNamespacesResponse {
|
|
|
753
812
|
pageToken?: string
|
|
754
813
|
}
|
|
755
814
|
|
|
815
|
+
/**
|
|
816
|
+
* Live per-bucket LSM state, as returned by `Table#getLsmStats`.
|
|
817
|
+
*
|
|
818
|
+
* Nothing here is derived: sums and differences (total L0 bytes, WAL lag) are
|
|
819
|
+
* the caller's to compute.
|
|
820
|
+
*/
|
|
821
|
+
export interface LsmStats {
|
|
822
|
+
/** One entry per bucket backing this table. */
|
|
823
|
+
buckets: Array<BucketStats>
|
|
824
|
+
}
|
|
825
|
+
|
|
756
826
|
/**
|
|
757
827
|
* Specification selecting Lance's MemWAL LSM-style write path for
|
|
758
828
|
* `mergeInsert`.
|
|
@@ -777,6 +847,23 @@ export interface LsmWriteSpec {
|
|
|
777
847
|
writerConfigDefaults?: Record<string, string>
|
|
778
848
|
}
|
|
779
849
|
|
|
850
|
+
/** One in-memory memtable. */
|
|
851
|
+
export interface MemtableStats {
|
|
852
|
+
/** The generation this memtable will become once sealed. */
|
|
853
|
+
generation: number
|
|
854
|
+
/** Rows currently buffered. */
|
|
855
|
+
rows: number
|
|
856
|
+
/** Estimated in-memory size. */
|
|
857
|
+
bytes: number
|
|
858
|
+
/** Record batches currently buffered. */
|
|
859
|
+
batches: number
|
|
860
|
+
/**
|
|
861
|
+
* Names of the indexes this memtable carries. An absent name is the whole
|
|
862
|
+
* answer to "why is my fresh-tier search on that column brute-force".
|
|
863
|
+
*/
|
|
864
|
+
indexes: Array<string>
|
|
865
|
+
}
|
|
866
|
+
|
|
780
867
|
export interface MergeResult {
|
|
781
868
|
version: number
|
|
782
869
|
numInsertedRows: number
|
|
@@ -867,6 +954,11 @@ export interface OptimizeStats {
|
|
|
867
954
|
/** Create a permutation builder for the given table */
|
|
868
955
|
export declare function permutationBuilder(table: Table): PermutationBuilder
|
|
869
956
|
|
|
957
|
+
export interface RefreshColumnResult {
|
|
958
|
+
rowsFilled: number
|
|
959
|
+
version: number
|
|
960
|
+
}
|
|
961
|
+
|
|
870
962
|
/**
|
|
871
963
|
* Install the LanceDB metrics recorder as the process-global `metrics` recorder.
|
|
872
964
|
*
|
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.38.0-beta.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
79
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.38.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.38.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.38.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.38.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.38.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.38.0-beta.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/table.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Table as ArrowTable, Data, DataType, Field, IntoVector, MultiVector, Schema } from "./arrow";
|
|
2
2
|
import { IndexOptions } from "./indices";
|
|
3
3
|
import { MergeInsertBuilder } from "./merge";
|
|
4
|
-
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, Job, Branches as NativeBranches, OptimizeStats, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
|
|
4
|
+
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, Job, LsmStats, Branches as NativeBranches, OptimizeStats, RefreshColumnResult, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
|
|
5
5
|
import { FullTextQuery, Query, TakeQuery, VectorQuery } from "./query";
|
|
6
6
|
import { IntoSql } from "./util";
|
|
7
7
|
export { IndexConfig } from "./native";
|
|
8
|
+
export { BucketStats, GenerationStats, LsmStats, MemtableStats, } from "./native";
|
|
8
9
|
/**
|
|
9
10
|
* Progress snapshot for a write operation, delivered to the `progress`
|
|
10
11
|
* callback passed to {@link Table.add}.
|
|
@@ -432,15 +433,67 @@ export declare abstract class Table {
|
|
|
432
433
|
abstract vectorSearch(vector: IntoVector | MultiVector): VectorQuery;
|
|
433
434
|
/**
|
|
434
435
|
* Add new columns with defined values.
|
|
436
|
+
*
|
|
437
|
+
* The `{ computed }` form stores the expression rather than evaluating it
|
|
438
|
+
* now: the column is committed with no values, and rows get them from
|
|
439
|
+
* {@link Table#refreshColumn}. Declaring one therefore costs the same on a
|
|
440
|
+
* large table as on an empty one.
|
|
441
|
+
*
|
|
442
|
+
* A refresh does not revisit rows it has already filled, so mutating an
|
|
443
|
+
* input leaves the value computed at fill time; recomputing means dropping
|
|
444
|
+
* the column and declaring it again. While a declaration reads a column,
|
|
445
|
+
* that column cannot be renamed, retyped or dropped.
|
|
446
|
+
*
|
|
447
|
+
* On LanceDB Cloud and Enterprise the expression is planned by the
|
|
448
|
+
* server, and the refresh runs as a server job -- see
|
|
449
|
+
* {@link Table#refreshColumnAsync}.
|
|
435
450
|
* @param {AddColumnsSql[] | Field | Field[] | Schema} newColumnTransforms Either:
|
|
436
451
|
* - An array of objects with column names and SQL expressions to calculate values
|
|
437
452
|
* - A single Arrow Field defining one column with its data type (column will be initialized with null values)
|
|
438
453
|
* - An array of Arrow Fields defining columns with their data types (columns will be initialized with null values)
|
|
439
454
|
* - An Arrow Schema defining columns with their data types (columns will be initialized with null values)
|
|
455
|
+
* - `{ computed }`, declaring columns defined by a SQL expression whose type and inputs are derived from it
|
|
440
456
|
* @returns {Promise<AddColumnsResult>} A promise that resolves to an object
|
|
441
457
|
* containing the new version number of the table after adding the columns.
|
|
458
|
+
* @example
|
|
459
|
+
* ```ts
|
|
460
|
+
* await table.addColumns({ computed: [{ name: "doubled", valueSql: "x * 2" }] });
|
|
461
|
+
* const { rowsFilled } = await table.refreshColumn("doubled");
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
abstract addColumns(newColumnTransforms: AddColumnsSql[] | Field | Field[] | Schema | {
|
|
465
|
+
computed: AddColumnsSql[];
|
|
466
|
+
}): Promise<AddColumnsResult>;
|
|
467
|
+
/**
|
|
468
|
+
* Fill the rows of a computed column that hold no value yet.
|
|
469
|
+
*
|
|
470
|
+
* Rows appended since the last refresh are filled by the next one; rows
|
|
471
|
+
* already filled are left as they are, so the call is idempotent and does
|
|
472
|
+
* not observe a mutated input. Local tables only: a remote refresh runs
|
|
473
|
+
* as a server job, through {@link Table#refreshColumnAsync}.
|
|
474
|
+
* @param {string} column The name of the computed column to fill.
|
|
475
|
+
* @returns {Promise<RefreshColumnResult>} A promise that resolves to the
|
|
476
|
+
* number of rows filled and the new version number of the table.
|
|
442
477
|
*/
|
|
443
|
-
abstract
|
|
478
|
+
abstract refreshColumn(column: string): Promise<RefreshColumnResult>;
|
|
479
|
+
/**
|
|
480
|
+
* Like {@link Table#refreshColumn}, but returns a handle to the refresh
|
|
481
|
+
* job instead of blocking until it completes.
|
|
482
|
+
*
|
|
483
|
+
* The job may already be complete when returned; callers must not assume
|
|
484
|
+
* the column is filled until {@link Job.wait} resolves. Invalid input --
|
|
485
|
+
* an unknown column, or one that is not computed -- rejects here rather
|
|
486
|
+
* than failing the job. On local tables the job runs in-process; on
|
|
487
|
+
* LanceDB Cloud and Enterprise it is the server's backfill job.
|
|
488
|
+
* @param {string} column The name of the computed column to fill.
|
|
489
|
+
* @example
|
|
490
|
+
* ```ts
|
|
491
|
+
* const job = await table.refreshColumnAsync("doubled");
|
|
492
|
+
* await job.wait();
|
|
493
|
+
* console.log(await job.status()); // "finished"
|
|
494
|
+
* ```
|
|
495
|
+
*/
|
|
496
|
+
abstract refreshColumnAsync(column: string): Promise<Job>;
|
|
444
497
|
/**
|
|
445
498
|
* Alter the name or nullability of columns.
|
|
446
499
|
* @param {ColumnAlteration[]} columnAlterations One or more alterations to
|
|
@@ -546,6 +599,57 @@ export declare abstract class Table {
|
|
|
546
599
|
* @returns {Promise<void>}
|
|
547
600
|
*/
|
|
548
601
|
abstract closeLsmWriters(): Promise<void>;
|
|
602
|
+
/**
|
|
603
|
+
* Seal every bucket's active memtable into a new L0 generation.
|
|
604
|
+
*
|
|
605
|
+
* Returns once the seal is committed. Sealing an empty memtable is a no-op,
|
|
606
|
+
* so this is safe to call repeatedly.
|
|
607
|
+
* @returns {Promise<void>}
|
|
608
|
+
*/
|
|
609
|
+
abstract flushLsm(): Promise<void>;
|
|
610
|
+
/**
|
|
611
|
+
* Trigger a background L0 → base compaction pass per bucket.
|
|
612
|
+
*
|
|
613
|
+
* Returns once the passes are *dispatched*, not once they finish — watch
|
|
614
|
+
* {@link Table#getLsmStats} for progress, or use
|
|
615
|
+
* {@link Table#checkpointLsm} to wait for convergence.
|
|
616
|
+
* @returns {Promise<void>}
|
|
617
|
+
*/
|
|
618
|
+
abstract compactLsm(): Promise<void>;
|
|
619
|
+
/**
|
|
620
|
+
* Converge this table's LSM write path into its base table.
|
|
621
|
+
*
|
|
622
|
+
* Seals once, then triggers compaction and polls until the L0 that existed
|
|
623
|
+
* at the start is gone. The target set is fixed at the start, so
|
|
624
|
+
* generations created *during* the checkpoint are ignored — that is what
|
|
625
|
+
* lets it terminate under write load, and what makes it best-effort: it
|
|
626
|
+
* converges the fresh tier as of some instant. Idempotent, abandonable at
|
|
627
|
+
* any point, and safe to run on a cadence.
|
|
628
|
+
*
|
|
629
|
+
* There is no liveness bound — the compactor pool is shared across tables,
|
|
630
|
+
* so a checkpoint queued behind unrelated work looks exactly like one that
|
|
631
|
+
* is merging. The caller owns the deadline.
|
|
632
|
+
* @returns {Promise<void>}
|
|
633
|
+
* @example
|
|
634
|
+
* ```ts
|
|
635
|
+
* const before = await table.getLsmStats();
|
|
636
|
+
* await table.checkpointLsm();
|
|
637
|
+
* const after = await table.getLsmStats();
|
|
638
|
+
* ```
|
|
639
|
+
*/
|
|
640
|
+
abstract checkpointLsm(): Promise<void>;
|
|
641
|
+
/**
|
|
642
|
+
* Read live per-bucket LSM state.
|
|
643
|
+
*
|
|
644
|
+
* Answers "how far behind is my fresh tier", "which bucket is hot", and
|
|
645
|
+
* "why is my fresh-tier vector search brute-force". Mutates no table state.
|
|
646
|
+
*
|
|
647
|
+
* Resolves to `undefined` only when the LSM write path is not enabled.
|
|
648
|
+
* @param {boolean} includeGenerationRows Also count rows per L0 generation.
|
|
649
|
+
* Off by default because each count opens an uncached Lance dataset.
|
|
650
|
+
* @returns {Promise<LsmStats | undefined>}
|
|
651
|
+
*/
|
|
652
|
+
abstract getLsmStats(includeGenerationRows?: boolean): Promise<LsmStats | undefined>;
|
|
549
653
|
/** Retrieve the version of the table */
|
|
550
654
|
abstract version(): Promise<number>;
|
|
551
655
|
/**
|
|
@@ -729,7 +833,11 @@ export declare class LocalTable extends Table {
|
|
|
729
833
|
query(): Query;
|
|
730
834
|
search(query: string | IntoVector | MultiVector | FullTextQuery, queryType?: string, ftsColumns?: string | string[]): VectorQuery | Query;
|
|
731
835
|
vectorSearch(vector: IntoVector | MultiVector): VectorQuery;
|
|
732
|
-
addColumns(newColumnTransforms: AddColumnsSql[] | Field | Field[] | Schema
|
|
836
|
+
addColumns(newColumnTransforms: AddColumnsSql[] | Field | Field[] | Schema | {
|
|
837
|
+
computed: AddColumnsSql[];
|
|
838
|
+
}): Promise<AddColumnsResult>;
|
|
839
|
+
refreshColumn(column: string): Promise<RefreshColumnResult>;
|
|
840
|
+
refreshColumnAsync(column: string): Promise<Job>;
|
|
733
841
|
alterColumns(columnAlterations: ColumnAlteration[]): Promise<AlterColumnsResult>;
|
|
734
842
|
updateFieldMetadata(updates: FieldMetadataUpdate[]): Promise<UpdateFieldMetadataResult>;
|
|
735
843
|
dropColumns(columnNames: string[]): Promise<DropColumnsResult>;
|
|
@@ -738,6 +846,10 @@ export declare class LocalTable extends Table {
|
|
|
738
846
|
unsetLsmWriteSpec(): Promise<void>;
|
|
739
847
|
getLsmWriteSpec(): Promise<LsmWriteSpec | undefined>;
|
|
740
848
|
closeLsmWriters(): Promise<void>;
|
|
849
|
+
flushLsm(): Promise<void>;
|
|
850
|
+
compactLsm(): Promise<void>;
|
|
851
|
+
checkpointLsm(): Promise<void>;
|
|
852
|
+
getLsmStats(includeGenerationRows?: boolean): Promise<LsmStats | undefined>;
|
|
741
853
|
version(): Promise<number>;
|
|
742
854
|
checkout(version: number | string): Promise<void>;
|
|
743
855
|
checkoutLatest(): Promise<void>;
|
package/dist/table.js
CHANGED
|
@@ -225,6 +225,12 @@ class LocalTable extends Table {
|
|
|
225
225
|
}
|
|
226
226
|
// TODO: Support BatchUDF
|
|
227
227
|
async addColumns(newColumnTransforms) {
|
|
228
|
+
// Columns defined by an expression are declared, not materialized here.
|
|
229
|
+
if (typeof newColumnTransforms === "object" &&
|
|
230
|
+
!Array.isArray(newColumnTransforms) &&
|
|
231
|
+
"computed" in newColumnTransforms) {
|
|
232
|
+
return await this.inner.addComputedColumns(newColumnTransforms.computed);
|
|
233
|
+
}
|
|
228
234
|
// Handle single Field -> convert to array of Fields
|
|
229
235
|
if (newColumnTransforms instanceof arrow_1.Field) {
|
|
230
236
|
newColumnTransforms = [newColumnTransforms];
|
|
@@ -250,6 +256,12 @@ class LocalTable extends Table {
|
|
|
250
256
|
}
|
|
251
257
|
throw new Error("Invalid input type for addColumns");
|
|
252
258
|
}
|
|
259
|
+
async refreshColumn(column) {
|
|
260
|
+
return await this.inner.refreshColumn(column);
|
|
261
|
+
}
|
|
262
|
+
async refreshColumnAsync(column) {
|
|
263
|
+
return await this.inner.refreshColumnAsync(column);
|
|
264
|
+
}
|
|
253
265
|
async alterColumns(columnAlterations) {
|
|
254
266
|
const processedAlterations = columnAlterations.map((alteration) => {
|
|
255
267
|
if (typeof alteration.dataType === "string") {
|
|
@@ -299,6 +311,18 @@ class LocalTable extends Table {
|
|
|
299
311
|
async closeLsmWriters() {
|
|
300
312
|
return await this.inner.closeLsmWriters();
|
|
301
313
|
}
|
|
314
|
+
async flushLsm() {
|
|
315
|
+
return await this.inner.flushLsm();
|
|
316
|
+
}
|
|
317
|
+
async compactLsm() {
|
|
318
|
+
return await this.inner.compactLsm();
|
|
319
|
+
}
|
|
320
|
+
async checkpointLsm() {
|
|
321
|
+
return await this.inner.checkpointLsm();
|
|
322
|
+
}
|
|
323
|
+
async getLsmStats(includeGenerationRows = false) {
|
|
324
|
+
return (await this.inner.getLsmStats(includeGenerationRows)) ?? undefined;
|
|
325
|
+
}
|
|
302
326
|
async version() {
|
|
303
327
|
return await this.inner.version();
|
|
304
328
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.38.0-beta.
|
|
14
|
+
"version": "0.38.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.38.0-beta.
|
|
110
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.38.0-beta.
|
|
111
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.38.0-beta.
|
|
112
|
-
"@lancedb/lancedb-linux-x64-musl": "0.38.0-beta.
|
|
113
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.38.0-beta.
|
|
114
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.38.0-beta.
|
|
115
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.38.0-beta.
|
|
109
|
+
"@lancedb/lancedb-darwin-arm64": "0.38.0-beta.3",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.38.0-beta.3",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.38.0-beta.3",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.38.0-beta.3",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.38.0-beta.3",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.38.0-beta.3",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.38.0-beta.3"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@types/node": ">=18",
|