@lancedb/lancedb 0.42.0-beta.2 → 0.42.0-beta.21
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/RUST_THIRD_PARTY_LICENSES.html +11637 -6176
- package/dist/arrow.js +3 -1
- package/dist/blob.d.ts +11 -0
- package/dist/blob.js +27 -0
- package/dist/cleanup.d.ts +31 -0
- package/dist/cleanup.js +80 -0
- package/dist/compaction.d.ts +23 -0
- package/dist/compaction.js +21 -0
- package/dist/connection.d.ts +2 -2
- package/dist/index.d.ts +13 -8
- package/dist/index.js +3 -2
- package/dist/indices.d.ts +44 -0
- package/dist/indices.js +42 -0
- package/dist/job.d.ts +117 -4
- package/dist/job.js +190 -12
- package/dist/merge.d.ts +17 -0
- package/dist/merge.js +7 -1
- package/dist/native.d.ts +296 -9
- package/dist/native.js +53 -52
- package/dist/prewarm.d.ts +40 -0
- package/dist/prewarm.js +37 -0
- package/dist/profiling.d.ts +44 -0
- package/dist/profiling.js +37 -0
- package/dist/query.d.ts +12 -2
- package/dist/query.js +55 -4
- package/dist/sql.d.ts +11 -0
- package/dist/sql.js +61 -0
- package/dist/table.d.ts +439 -12
- package/dist/table.js +461 -18
- package/package.json +9 -9
- package/pnpm-workspace.yaml +0 -7
package/dist/native.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class BranchContents {
|
|
|
19
19
|
|
|
20
20
|
export declare class Branches {
|
|
21
21
|
list(): Promise<Record<string, BranchContents>>
|
|
22
|
-
create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null): Promise<Table>
|
|
22
|
+
create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null, fromTag?: string | undefined | null): Promise<Table>
|
|
23
23
|
checkout(name: string, version?: number | undefined | null): Promise<Table>
|
|
24
24
|
delete(name: string): Promise<void>
|
|
25
25
|
diff(fromBranch: string): Promise<Record<string, unknown>>
|
|
@@ -165,6 +165,7 @@ export declare class Index {
|
|
|
165
165
|
static bitmap(): Index
|
|
166
166
|
static labelList(): Index
|
|
167
167
|
static fm(): Index
|
|
168
|
+
static rtree(pageSize?: number | undefined | null): Index
|
|
168
169
|
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, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null, blockSize?: number | undefined | null): Index
|
|
169
170
|
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, targetPartitionSize?: number | undefined | null): Index
|
|
170
171
|
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, targetPartitionSize?: number | undefined | null): Index
|
|
@@ -177,6 +178,13 @@ export declare class Job {
|
|
|
177
178
|
* Local handles have no ID.
|
|
178
179
|
*/
|
|
179
180
|
get id(): string | null
|
|
181
|
+
get jobId(): string | null
|
|
182
|
+
get operationId(): string | null
|
|
183
|
+
get attempt(): number | null
|
|
184
|
+
get retryOf(): string | null
|
|
185
|
+
get lifecycleState(): string | null
|
|
186
|
+
get sourceTableVersion(): number | null
|
|
187
|
+
get executionEpoch(): number | null
|
|
180
188
|
/**
|
|
181
189
|
* The operation's current lifecycle state: "running", "finished",
|
|
182
190
|
* "failed", or "cancelled".
|
|
@@ -197,9 +205,12 @@ export declare class Job {
|
|
|
197
205
|
* supplied, observe the same progress snapshots fetched by the existing
|
|
198
206
|
* backend poller without starting another polling loop.
|
|
199
207
|
*/
|
|
200
|
-
wait(progressCallback?: (progress: Record<string, unknown>) => void): Promise<void>
|
|
208
|
+
wait(progressCallback?: (progress: Record<string, unknown>) => void, timeoutMs?: number): Promise<void>
|
|
209
|
+
/** The typed terminal value used by result-returning SDK operations. */
|
|
210
|
+
waitResult(progressCallback?: (progress: Record<string, unknown>) => void, timeoutMs?: number): Promise<any | null>
|
|
201
211
|
/** Request cancellation. Cancelling a finished operation is a no-op. */
|
|
202
212
|
cancel(): Promise<void>
|
|
213
|
+
retry(): Promise<Job>
|
|
203
214
|
/**
|
|
204
215
|
* Ask the backend for this job's current state, and for a server-side job
|
|
205
216
|
* its full record, then cache it for the getters below.
|
|
@@ -228,11 +239,15 @@ export declare class Job {
|
|
|
228
239
|
get resultJson(): string | null
|
|
229
240
|
/** Why the job failed, when it failed and the server reports a reason. */
|
|
230
241
|
get failure(): JobFailureInfo | null
|
|
242
|
+
captureProfile(workerId: string, kind: string, durationSeconds?: number | undefined | null, sessionSlot?: number | undefined | null): Promise<string>
|
|
243
|
+
profileStatus(profileId: string): Promise<string>
|
|
244
|
+
waitForProfile(profileId: string, timeoutMs?: number | undefined | null, pollIntervalMs?: number | undefined | null): Promise<string>
|
|
245
|
+
profileArtifact(profileId: string): Promise<string>
|
|
231
246
|
/**
|
|
232
247
|
* This job's recorded lifecycle events, as an Arrow IPC stream buffer.
|
|
233
248
|
* The TypeScript wrapper turns it into an Arrow table.
|
|
234
249
|
*/
|
|
235
|
-
events(limit?: number | undefined | null, filter?: string | undefined | null): Promise<Buffer>
|
|
250
|
+
events(limit?: number | undefined | null, filter?: string | undefined | null, pageToken?: string | undefined | null): Promise<Buffer>
|
|
236
251
|
}
|
|
237
252
|
|
|
238
253
|
export declare class JobListing {
|
|
@@ -299,7 +314,7 @@ export declare class NativeMergeInsertBuilder {
|
|
|
299
314
|
useIndex(useIndex: boolean): NativeMergeInsertBuilder
|
|
300
315
|
useRTE(enable: boolean): NativeMergeInsertBuilder
|
|
301
316
|
validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
|
|
302
|
-
execute(buf: Buffer): Promise<MergeResult>
|
|
317
|
+
execute(buf: Buffer, retries?: number | undefined | null): Promise<MergeResult>
|
|
303
318
|
}
|
|
304
319
|
|
|
305
320
|
/**
|
|
@@ -439,7 +454,7 @@ export declare class Table {
|
|
|
439
454
|
close(): void
|
|
440
455
|
/** Return Schema as empty Arrow IPC file. */
|
|
441
456
|
schema(): Promise<Buffer>
|
|
442
|
-
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void, allowExternalBlobOutsideBases?: boolean): Promise<AddResult>
|
|
457
|
+
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void, allowExternalBlobOutsideBases?: boolean, retries?: number): Promise<AddResult>
|
|
443
458
|
countRows(filter?: string | undefined | null): Promise<number>
|
|
444
459
|
delete(predicate: string): Promise<DeleteResult>
|
|
445
460
|
createIndex(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<void>
|
|
@@ -447,25 +462,35 @@ export declare class Table {
|
|
|
447
462
|
dropIndex(indexName: string): Promise<void>
|
|
448
463
|
prewarmIndex(indexName: string): Promise<void>
|
|
449
464
|
prewarmData(columns?: Array<string> | undefined | null): Promise<void>
|
|
465
|
+
prewarmDataAsync(options?: PrewarmDataOptions | undefined | null): Promise<Job>
|
|
466
|
+
explainPrewarmData(options?: PrewarmDataOptions | undefined | null): Promise<any>
|
|
450
467
|
waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
|
|
451
468
|
stats(): Promise<TableStatistics>
|
|
452
469
|
initialStorageOptions(): Promise<Record<string, string> | null>
|
|
453
470
|
latestStorageOptions(): Promise<Record<string, string> | null>
|
|
454
471
|
update(onlyIf: string | undefined | null, columns: Array<[string, string]>): Promise<UpdateResult>
|
|
455
472
|
query(): Query
|
|
473
|
+
/** Whether this handle reads an in-process dataset. */
|
|
474
|
+
isNative(): boolean
|
|
475
|
+
/** Constrain deferred blob reads by the producing query response. */
|
|
476
|
+
querySnapshotWithIdentity(version: string, identity: string): Promise<Table>
|
|
456
477
|
/** Return a read-only table handle pinned to the current query revision. */
|
|
457
478
|
querySnapshot(): Promise<Table>
|
|
458
479
|
takeOffsets(offsets: Array<number>): TakeQuery
|
|
459
480
|
takeRowIds(rowIds: Array<bigint>): TakeQuery
|
|
460
481
|
blobColumns(): Promise<Array<string>>
|
|
461
482
|
fetchBlobs(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<Buffer | undefined | null>>
|
|
483
|
+
fetchBlobRanges(column: string, requests: Array<BlobRangeRequest>, signal?: AbortSignal | undefined | null): Promise<Array<Buffer | undefined | null>>
|
|
462
484
|
fetchBlobFiles(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<BlobFile | undefined | null>>
|
|
463
485
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
464
486
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
465
487
|
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
466
|
-
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
467
|
-
refreshColumnAsync(column: string): Promise<Job>
|
|
488
|
+
refreshColumn(column: string, options?: RefreshColumnOptions | undefined | null): Promise<RefreshColumnResult>
|
|
489
|
+
refreshColumnAsync(column: string, options?: RefreshColumnOptions | undefined | null): Promise<Job>
|
|
468
490
|
functionErrors(options?: FunctionErrorsOptions | undefined | null): Promise<FunctionErrors>
|
|
491
|
+
functionColumnStatuses(column?: string | undefined | null): Promise<Array<FunctionColumnStatus>>
|
|
492
|
+
functionColumnStatus(column: string): Promise<FunctionColumnStatus>
|
|
493
|
+
waitForFunctionColumn(column: string, timeoutSeconds?: number | undefined | null): Promise<FunctionColumnStatus>
|
|
469
494
|
refreshMaterializedView(sourceVersion?: number | undefined | null, full?: boolean | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
470
495
|
materializedViewDefinition(): Promise<string>
|
|
471
496
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
@@ -476,6 +501,9 @@ export declare class Table {
|
|
|
476
501
|
enableRTE(spec: RTEWriteSpec): Promise<void>
|
|
477
502
|
disableRTE(): Promise<void>
|
|
478
503
|
getRTESpec(): Promise<RTEWriteSpec | null>
|
|
504
|
+
getTableOverrides(): Promise<Record<string, unknown>>
|
|
505
|
+
updateTableOverrides(overrides: Record<string, unknown>): Promise<Record<string, unknown>>
|
|
506
|
+
resetTableOverrides(): Promise<Record<string, unknown>>
|
|
479
507
|
closeRTEWriters(): Promise<void>
|
|
480
508
|
flushRTE(): Promise<void>
|
|
481
509
|
compactRTE(): Promise<void>
|
|
@@ -486,13 +514,18 @@ export declare class Table {
|
|
|
486
514
|
checkout(version: number): Promise<void>
|
|
487
515
|
checkoutTag(tag: string): Promise<void>
|
|
488
516
|
checkoutLatest(): Promise<void>
|
|
517
|
+
/** Compare two persisted versions or same-branch tags. */
|
|
518
|
+
delta(fromVersion: DeltaRef, toVersion?: DeltaRef | undefined | null): Promise<TableDelta>
|
|
489
519
|
listVersions(): Promise<Array<Version>>
|
|
490
520
|
restore(): Promise<void>
|
|
491
521
|
tags(): Promise<Tags>
|
|
492
522
|
branches(): Promise<Branches>
|
|
493
523
|
/** The branch this handle is scoped to, or `null` for the main branch. */
|
|
494
524
|
currentBranch(): string | null
|
|
495
|
-
|
|
525
|
+
explainCleanup(minAgeSeconds?: number | undefined | null): Promise<any>
|
|
526
|
+
cleanupAsync(minAgeSeconds?: number | undefined | null): Promise<Job>
|
|
527
|
+
compactAsync(options?: CompactionOptions | undefined | null): Promise<Job>
|
|
528
|
+
optimize(beforeTimestampMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null, compactionOptions?: CompactionOptions | undefined | null): Promise<OptimizeStats>
|
|
496
529
|
listIndices(): Promise<Array<IndexConfig>>
|
|
497
530
|
tokenize(query: string, column?: string | undefined | null, indexName?: string | undefined | null): Promise<Array<FtsToken>>
|
|
498
531
|
indexStats(indexName: string): Promise<IndexStatistics | null>
|
|
@@ -501,15 +534,33 @@ export declare class Table {
|
|
|
501
534
|
migrateManifestPathsV2(): Promise<void>
|
|
502
535
|
}
|
|
503
536
|
|
|
537
|
+
/** A pinned version range with streaming row changes. */
|
|
538
|
+
export declare class TableDelta {
|
|
539
|
+
beginVersion(): bigint
|
|
540
|
+
endVersion(): bigint
|
|
541
|
+
insertedRows(): Promise<RecordBatchIterator>
|
|
542
|
+
updatedRows(): Promise<RecordBatchIterator>
|
|
543
|
+
upsertedRows(): Promise<RecordBatchIterator>
|
|
544
|
+
deletedRowIds(): Promise<RecordBatchIterator>
|
|
545
|
+
listTransactions(): Promise<Array<TableDeltaTransaction>>
|
|
546
|
+
}
|
|
547
|
+
|
|
504
548
|
export declare class TagContents {
|
|
505
549
|
version: number
|
|
506
550
|
manifestSize: number
|
|
507
551
|
}
|
|
508
552
|
|
|
553
|
+
/** Tags label table versions with human-readable names. */
|
|
509
554
|
export declare class Tags {
|
|
510
555
|
list(): Promise<Record<string, TagContents>>
|
|
511
556
|
getVersion(tag: string): Promise<number>
|
|
512
|
-
|
|
557
|
+
/**
|
|
558
|
+
* Create a tag for a table version.
|
|
559
|
+
*
|
|
560
|
+
* Omit `version` to tag the version this handle currently shows,
|
|
561
|
+
* including a checked-out version.
|
|
562
|
+
*/
|
|
563
|
+
create(tag: string, version?: number | undefined | null): Promise<void>
|
|
513
564
|
delete(tag: string): Promise<void>
|
|
514
565
|
update(tag: string, version: number): Promise<void>
|
|
515
566
|
}
|
|
@@ -585,6 +636,12 @@ export interface BlobRange {
|
|
|
585
636
|
end: bigint
|
|
586
637
|
}
|
|
587
638
|
|
|
639
|
+
export interface BlobRangeRequest {
|
|
640
|
+
rowId: bigint
|
|
641
|
+
offset: bigint
|
|
642
|
+
length: bigint
|
|
643
|
+
}
|
|
644
|
+
|
|
588
645
|
export interface CatalogOptions {
|
|
589
646
|
apiKey?: string
|
|
590
647
|
clientConfig?: ClientConfig
|
|
@@ -672,6 +729,14 @@ export interface ColumnOrdering {
|
|
|
672
729
|
columnName: string
|
|
673
730
|
}
|
|
674
731
|
|
|
732
|
+
/** Per-invocation file-compaction settings. All numbers must be safe integers. */
|
|
733
|
+
export interface CompactionOptions {
|
|
734
|
+
targetRowsPerFragment?: number
|
|
735
|
+
maxSourceRows?: number
|
|
736
|
+
ioBufferSize?: number
|
|
737
|
+
batchSize?: number
|
|
738
|
+
}
|
|
739
|
+
|
|
675
740
|
/** Statistics about a compaction operation. */
|
|
676
741
|
export interface CompactionStats {
|
|
677
742
|
/** The number of fragments removed */
|
|
@@ -784,6 +849,14 @@ export interface DeleteResult {
|
|
|
784
849
|
version: number
|
|
785
850
|
}
|
|
786
851
|
|
|
852
|
+
/** One endpoint of a table delta: a positive version or a same-branch tag. */
|
|
853
|
+
export interface DeltaRef {
|
|
854
|
+
/** A persisted version, expressed as a positive lossless u64 bigint. */
|
|
855
|
+
version?: bigint
|
|
856
|
+
/** A tag on the table handle's current branch. */
|
|
857
|
+
tag?: string
|
|
858
|
+
}
|
|
859
|
+
|
|
787
860
|
export interface DescribeNamespaceResponse {
|
|
788
861
|
properties?: Record<string, string>
|
|
789
862
|
}
|
|
@@ -851,6 +924,54 @@ export interface FtsToken {
|
|
|
851
924
|
/** Call an arbitrary registered SQL function by name. */
|
|
852
925
|
export declare function func(name: string, args: Array<Expr>): Expr
|
|
853
926
|
|
|
927
|
+
/** Automatic-refresh projection for a Function output. */
|
|
928
|
+
export interface FunctionColumnAutoRefreshStatus {
|
|
929
|
+
enabled: boolean
|
|
930
|
+
intervalSeconds?: bigint
|
|
931
|
+
activeJobId?: string
|
|
932
|
+
state: string
|
|
933
|
+
failureStreak: number
|
|
934
|
+
effectiveCooldownMillis?: bigint
|
|
935
|
+
blockedReason?: string
|
|
936
|
+
nextRunAtMillis?: bigint
|
|
937
|
+
nextRunAtReason?: string
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/** Latest matching refresh Job projected for a Function output. */
|
|
941
|
+
export interface FunctionColumnLastRefreshJob {
|
|
942
|
+
jobId: string
|
|
943
|
+
state: string
|
|
944
|
+
automatic?: boolean
|
|
945
|
+
completedAtMillis?: bigint
|
|
946
|
+
failure?: JobFailureInfo
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/** Exact four-way status of one Function output at one table version. */
|
|
950
|
+
export interface FunctionColumnStatus {
|
|
951
|
+
column: string
|
|
952
|
+
bindingId: string
|
|
953
|
+
function: FunctionColumnVersionStatus
|
|
954
|
+
tableVersion: bigint
|
|
955
|
+
rows: bigint
|
|
956
|
+
fresh: bigint
|
|
957
|
+
stale: bigint
|
|
958
|
+
neverComputed: bigint
|
|
959
|
+
failed: bigint
|
|
960
|
+
lastRefreshJob?: FunctionColumnLastRefreshJob
|
|
961
|
+
lastFailureJob?: FunctionColumnLastRefreshJob
|
|
962
|
+
autoRefresh: FunctionColumnAutoRefreshStatus
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/** One exact immutable Function revision attached to a table output. */
|
|
966
|
+
export interface FunctionColumnVersionStatus {
|
|
967
|
+
name: string
|
|
968
|
+
namespacePath: Array<string>
|
|
969
|
+
objectId: string
|
|
970
|
+
location: string
|
|
971
|
+
version: string
|
|
972
|
+
manifestDigest: string
|
|
973
|
+
}
|
|
974
|
+
|
|
854
975
|
/**
|
|
855
976
|
* A fragment whose per-row error detail was capped: `rowsSkipped` rows
|
|
856
977
|
* failed, of which only `rowsRecorded` have a record of their own.
|
|
@@ -877,6 +998,8 @@ export interface FunctionErrorRecord {
|
|
|
877
998
|
tableVersion: number
|
|
878
999
|
errorType: string
|
|
879
1000
|
errorMessage: string
|
|
1001
|
+
/** User-code traceback, possibly truncated by the server. */
|
|
1002
|
+
traceback?: string
|
|
880
1003
|
createdAtMillis: number
|
|
881
1004
|
}
|
|
882
1005
|
|
|
@@ -888,6 +1011,8 @@ export interface FunctionErrors {
|
|
|
888
1011
|
fragments: Array<FunctionErrorFragment>
|
|
889
1012
|
/** Whether the listing stopped at its limit. */
|
|
890
1013
|
truncated: boolean
|
|
1014
|
+
/** Continue the same job/filter. Absent for complete pages and older servers. */
|
|
1015
|
+
pageToken?: string
|
|
891
1016
|
}
|
|
892
1017
|
|
|
893
1018
|
/** Which per-row Function errors to list; every filter is optional. */
|
|
@@ -898,6 +1023,72 @@ export interface FunctionErrorsOptions {
|
|
|
898
1023
|
column?: string
|
|
899
1024
|
/** At most this many records (server default 10000, cap 100000). */
|
|
900
1025
|
limit?: number
|
|
1026
|
+
/** Empty starts retained history, including repaired rows, for an exact jobId; otherwise continue that page. */
|
|
1027
|
+
pageToken?: string
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Resources and sizing policy for the planning fleet of one registered
|
|
1032
|
+
* Function refresh.
|
|
1033
|
+
*/
|
|
1034
|
+
export interface FunctionRefreshPlanningConfig {
|
|
1035
|
+
/** CPU, memory, and ephemeral-storage limits for one planning worker. */
|
|
1036
|
+
resources: FunctionRefreshPodResources
|
|
1037
|
+
/** Maximum number of planning workers. */
|
|
1038
|
+
maxWorkers: number
|
|
1039
|
+
/** Maximum rows assigned to one planning worker. */
|
|
1040
|
+
rowsPerWorker: number
|
|
1041
|
+
/** Maximum fragments assigned to one planning worker. */
|
|
1042
|
+
fragmentsPerWorker: number
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* CPU, memory, and ephemeral-storage limits for one Function refresh
|
|
1047
|
+
* control-plane pod.
|
|
1048
|
+
*/
|
|
1049
|
+
export interface FunctionRefreshPodResources {
|
|
1050
|
+
/** CPU limit in millicores; 1000 is one CPU. */
|
|
1051
|
+
cpuMillis: number
|
|
1052
|
+
/** Memory limit in bytes. */
|
|
1053
|
+
memoryBytes: number
|
|
1054
|
+
/** Ephemeral storage limit in bytes. */
|
|
1055
|
+
ephemeralStorageBytes: number
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Overrides retries of failed user-code calls for one refresh. Omitted
|
|
1060
|
+
* fields use the Function refresh defaults.
|
|
1061
|
+
*/
|
|
1062
|
+
export interface FunctionRetryPolicy {
|
|
1063
|
+
/** Total calls, including the first; 1 disables retries, maximum 100. */
|
|
1064
|
+
maxAttempts?: number
|
|
1065
|
+
/** Initial exponential-backoff ceiling, in seconds. */
|
|
1066
|
+
initialBackoffSeconds?: number
|
|
1067
|
+
/** Maximum backoff, in seconds. */
|
|
1068
|
+
maxBackoffSeconds?: number
|
|
1069
|
+
/** Exception class names, preferably qualified. */
|
|
1070
|
+
exceptionTypes?: Array<string>
|
|
1071
|
+
/** Regular expression matched against the exception class and message. */
|
|
1072
|
+
messagePattern?: string
|
|
1073
|
+
/** Structured provider error codes or HTTP status codes. */
|
|
1074
|
+
errorCodes?: Array<string>
|
|
1075
|
+
/**
|
|
1076
|
+
* Match connection/timeouts, HTTP 429/503, SlowDown and
|
|
1077
|
+
* ServiceUnavailable.
|
|
1078
|
+
*/
|
|
1079
|
+
transient?: boolean
|
|
1080
|
+
/** Honor Retry-After within the configured maximum. */
|
|
1081
|
+
honorRetryAfter?: boolean
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/** Aggregate worker resources for one Enterprise Function refresh. */
|
|
1085
|
+
export interface FunctionWorkerResourceBudget {
|
|
1086
|
+
/** Aggregate CPU budget in millicores; 1000 is one CPU. */
|
|
1087
|
+
cpuMillis: number
|
|
1088
|
+
/** Aggregate memory budget in bytes. */
|
|
1089
|
+
memoryBytes: number
|
|
1090
|
+
/** Aggregate GPU budget. Omitted means zero, a CPU-only refresh. */
|
|
1091
|
+
gpuCount?: number
|
|
901
1092
|
}
|
|
902
1093
|
|
|
903
1094
|
/** A description of an index currently configured on a column */
|
|
@@ -991,7 +1182,11 @@ export interface IndexStatistics {
|
|
|
991
1182
|
export interface JobFailureInfo {
|
|
992
1183
|
phase?: string
|
|
993
1184
|
message?: string
|
|
1185
|
+
/** User-code traceback, possibly truncated by the server. */
|
|
1186
|
+
traceback?: string
|
|
994
1187
|
retryable?: boolean
|
|
1188
|
+
/** Isolated SQL job that raised this failure, when supplied by the server. */
|
|
1189
|
+
sqlJobId?: string
|
|
995
1190
|
}
|
|
996
1191
|
|
|
997
1192
|
/** A row from `Connection.listJobs`: one server-side job. */
|
|
@@ -1008,6 +1203,18 @@ export interface JobInfo {
|
|
|
1008
1203
|
state: string
|
|
1009
1204
|
/** When the job was created, in milliseconds since the epoch. */
|
|
1010
1205
|
createdAtMillis: number
|
|
1206
|
+
/** Terminal timestamp in milliseconds since the epoch, when known. */
|
|
1207
|
+
completedAtMillis?: number
|
|
1208
|
+
/** Creation-to-completion wall time, including queueing and pauses. */
|
|
1209
|
+
durationMillis?: number
|
|
1210
|
+
/** Affected columns; empty when unavailable or not column-scoped. */
|
|
1211
|
+
columns: Array<string>
|
|
1212
|
+
/** Pinned Function catalog name, with namespace segments joined by `$`. */
|
|
1213
|
+
functionName?: string
|
|
1214
|
+
/** Pinned Function version, when known. */
|
|
1215
|
+
functionVersion?: string
|
|
1216
|
+
/** Durable failure summary, when available. */
|
|
1217
|
+
failure?: JobFailureInfo
|
|
1011
1218
|
/** Structured lifecycle, queue, pause, and job-type-specific progress. */
|
|
1012
1219
|
progress: Record<string, unknown>
|
|
1013
1220
|
/** Whether an operator has parked this job. */
|
|
@@ -1158,6 +1365,77 @@ export interface OptimizeStats {
|
|
|
1158
1365
|
/** Create a permutation builder for the given table */
|
|
1159
1366
|
export declare function permutationBuilder(table: Table): PermutationBuilder
|
|
1160
1367
|
|
|
1368
|
+
/** Settings for durable data-cache prewarm submission. */
|
|
1369
|
+
export interface PrewarmDataOptions {
|
|
1370
|
+
columns?: Array<string>
|
|
1371
|
+
filter?: string
|
|
1372
|
+
concurrency?: number
|
|
1373
|
+
parameters?: Buffer
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Options for `Table.refreshColumn` and `Table.refreshColumnAsync`. Every
|
|
1378
|
+
* option is LanceDB Enterprise only; a LanceDB Embedded refresh ignores
|
|
1379
|
+
* `batchSize`, `gpuClass` and `gpuCount` and rejects the rest, including
|
|
1380
|
+
* `resourceBudget`.
|
|
1381
|
+
*/
|
|
1382
|
+
export interface RefreshColumnOptions {
|
|
1383
|
+
/** Only refresh the rows matching this SQL filter. */
|
|
1384
|
+
where?: string
|
|
1385
|
+
/** Maximum rows per Function call; must be greater than zero. */
|
|
1386
|
+
batchSize?: number
|
|
1387
|
+
/**
|
|
1388
|
+
* Row-count threshold for publishing completed Function split ranges.
|
|
1389
|
+
* Must be a positive safe integer. Omit for whole-fragment publication.
|
|
1390
|
+
* Actual publications can be larger; remaining rows publish at completion.
|
|
1391
|
+
* Requires LanceDB Enterprise with non-Blob Function outputs.
|
|
1392
|
+
*/
|
|
1393
|
+
publicationIntervalRows?: number
|
|
1394
|
+
/**
|
|
1395
|
+
* Override the registered Function's maximum concurrent user-code calls
|
|
1396
|
+
* for this logical execution.
|
|
1397
|
+
*/
|
|
1398
|
+
maxConcurrency?: number
|
|
1399
|
+
/** GPU class for Function workers. */
|
|
1400
|
+
gpuClass?: string
|
|
1401
|
+
/**
|
|
1402
|
+
* Complete aggregate CPU and memory budget for a registered Function
|
|
1403
|
+
* refresh. `gpuCount` inside the budget defaults to zero.
|
|
1404
|
+
*/
|
|
1405
|
+
resourceBudget?: FunctionWorkerResourceBudget
|
|
1406
|
+
/** CPU, memory, and ephemeral-storage limits for the refresh supervisor. */
|
|
1407
|
+
supervisorResources?: FunctionRefreshPodResources
|
|
1408
|
+
/** Resources and sizing for the refresh planning fleet. */
|
|
1409
|
+
planningWorkers?: FunctionRefreshPlanningConfig
|
|
1410
|
+
/** Positive aggregate GPU budget for Function workers. */
|
|
1411
|
+
gpuCount?: number
|
|
1412
|
+
/** Override retries of failed user-code calls for this refresh. */
|
|
1413
|
+
retryPolicy?: FunctionRetryPolicy
|
|
1414
|
+
/**
|
|
1415
|
+
* `"fail"` (default) stops on a row error; `"skip"` writes null and
|
|
1416
|
+
* records the error, subject to the failure limits.
|
|
1417
|
+
*/
|
|
1418
|
+
errorPolicy?: string
|
|
1419
|
+
/**
|
|
1420
|
+
* Under a skip policy, fail the job once more than this share of rows
|
|
1421
|
+
* (0 to 1) has failed.
|
|
1422
|
+
*/
|
|
1423
|
+
maxFailedFraction?: number
|
|
1424
|
+
/**
|
|
1425
|
+
* Under a skip policy, fail the job once more than this many rows have
|
|
1426
|
+
* failed.
|
|
1427
|
+
*/
|
|
1428
|
+
maxFailedRows?: number
|
|
1429
|
+
/** Deadline for one Function call, in seconds. */
|
|
1430
|
+
rowTimeoutSeconds?: number
|
|
1431
|
+
/** Deadline for Function initialization, in seconds. */
|
|
1432
|
+
initTimeoutSeconds?: number
|
|
1433
|
+
/** Worker count for an expression column; Function columns reject it. */
|
|
1434
|
+
numWorkers?: number
|
|
1435
|
+
/** Cap on executor processes per Function worker. */
|
|
1436
|
+
maxExecutorProcessesPerWorker?: number
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1161
1439
|
export interface RefreshColumnResult {
|
|
1162
1440
|
rowsFilled: number
|
|
1163
1441
|
version: number
|
|
@@ -1367,6 +1645,15 @@ export interface SsTableStats {
|
|
|
1367
1645
|
rows?: number
|
|
1368
1646
|
}
|
|
1369
1647
|
|
|
1648
|
+
/** A committed transaction in a table delta range. */
|
|
1649
|
+
export interface TableDeltaTransaction {
|
|
1650
|
+
readVersion: bigint
|
|
1651
|
+
uuid: string
|
|
1652
|
+
operation: string
|
|
1653
|
+
tag?: string
|
|
1654
|
+
transactionProperties?: Record<string, string>
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1370
1657
|
/**
|
|
1371
1658
|
* Live state of one table shard. A table is N table shards on one node; flattening to a
|
|
1372
1659
|
* single number hides the one hot table shard that is usually why someone opened
|