@lancedb/lancedb 0.19.1-beta.0 → 0.19.1-beta.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Connection } from "./connection";
2
2
  import { ConnectionOptions } from "./native.js";
3
- export { AddColumnsSql, ConnectionOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, OptimizeStats, CompactionStats, RemovalStats, Tags, TagContents, } from "./native.js";
3
+ export { AddColumnsSql, ConnectionOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, } from "./native.js";
4
4
  export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
5
5
  export { Connection, CreateTableOptions, TableNamesOptions, OpenTableOptions, } from "./connection";
6
6
  export { ExecutableQuery, Query, QueryBase, VectorQuery, QueryExecutionOptions, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, FullTextQueryType, } from "./query";
package/dist/native.d.ts CHANGED
@@ -191,6 +191,40 @@ export interface IndexStatistics {
191
191
  */
192
192
  loss?: number
193
193
  }
194
+ export interface TableStatistics {
195
+ /** The total number of bytes in the table */
196
+ totalBytes: number
197
+ /** The number of rows in the table */
198
+ numRows: number
199
+ /** The number of indices in the table */
200
+ numIndices: number
201
+ /** Statistics on table fragments */
202
+ fragmentStats: FragmentStatistics
203
+ }
204
+ export interface FragmentStatistics {
205
+ /** The number of fragments in the table */
206
+ numFragments: number
207
+ /** The number of uncompacted fragments in the table */
208
+ numSmallFragments: number
209
+ /** Statistics on the number of rows in the table fragments */
210
+ lengths: FragmentSummaryStats
211
+ }
212
+ export interface FragmentSummaryStats {
213
+ /** The number of rows in the fragment with the fewest rows */
214
+ min: number
215
+ /** The number of rows in the fragment with the most rows */
216
+ max: number
217
+ /** The mean number of rows in the fragments */
218
+ mean: number
219
+ /** The 25th percentile of number of rows in the fragments */
220
+ p25: number
221
+ /** The 50th percentile of number of rows in the fragments */
222
+ p50: number
223
+ /** The 75th percentile of number of rows in the fragments */
224
+ p75: number
225
+ /** The 99th percentile of number of rows in the fragments */
226
+ p99: number
227
+ }
194
228
  export interface Version {
195
229
  version: number
196
230
  timestamp: number
@@ -353,6 +387,7 @@ export class Table {
353
387
  dropIndex(indexName: string): Promise<void>
354
388
  prewarmIndex(indexName: string): Promise<void>
355
389
  waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
390
+ stats(): Promise<TableStatistics>
356
391
  update(onlyIf: string | undefined | null, columns: Array<[string, string]>): Promise<bigint>
357
392
  query(): Query
358
393
  vectorSearch(vector: Float32Array): VectorQuery
package/dist/table.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Table as ArrowTable, Data, DataType, IntoVector, Schema } from "./arrow";
2
2
  import { IndexOptions } from "./indices";
3
3
  import { MergeInsertBuilder } from "./merge";
4
- import { AddColumnsSql, IndexConfig, IndexStatistics, OptimizeStats, Tags, Table as _NativeTable } from "./native";
4
+ import { AddColumnsSql, IndexConfig, IndexStatistics, OptimizeStats, TableStatistics, Tags, Table as _NativeTable } from "./native";
5
5
  import { FullTextQuery, Query, VectorQuery } from "./query";
6
6
  import { IntoSql } from "./util";
7
7
  export { IndexConfig } from "./native";
@@ -415,6 +415,12 @@ export declare abstract class Table {
415
415
  * Use {@link Table.listIndices} to find the names of the indices.
416
416
  */
417
417
  abstract indexStats(name: string): Promise<IndexStatistics | undefined>;
418
+ /** Returns table and fragment statistics
419
+ *
420
+ * @returns {TableStatistics} The table and fragment statistics
421
+ *
422
+ */
423
+ abstract stats(): Promise<TableStatistics>;
418
424
  }
419
425
  export declare class LocalTable extends Table {
420
426
  private readonly inner;
@@ -454,6 +460,7 @@ export declare class LocalTable extends Table {
454
460
  listIndices(): Promise<IndexConfig[]>;
455
461
  toArrow(): Promise<ArrowTable>;
456
462
  indexStats(name: string): Promise<IndexStatistics | undefined>;
463
+ stats(): Promise<TableStatistics>;
457
464
  mergeInsert(on: string | string[]): MergeInsertBuilder;
458
465
  /**
459
466
  * Check if the table uses the new manifest path scheme.
package/dist/table.js CHANGED
@@ -251,6 +251,9 @@ class LocalTable extends Table {
251
251
  }
252
252
  return stats;
253
253
  }
254
+ async stats() {
255
+ return await this.inner.stats();
256
+ }
254
257
  mergeInsert(on) {
255
258
  on = Array.isArray(on) ? on : [on];
256
259
  return new merge_1.MergeInsertBuilder(this.inner.mergeInsert(on), this.schema());
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.19.1-beta.0",
14
+ "version": "0.19.1-beta.1",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -100,14 +100,14 @@
100
100
  "reflect-metadata": "^0.2.2"
101
101
  },
102
102
  "optionalDependencies": {
103
- "@lancedb/lancedb-darwin-x64": "0.19.1-beta.0",
104
- "@lancedb/lancedb-darwin-arm64": "0.19.1-beta.0",
105
- "@lancedb/lancedb-linux-x64-gnu": "0.19.1-beta.0",
106
- "@lancedb/lancedb-linux-arm64-gnu": "0.19.1-beta.0",
107
- "@lancedb/lancedb-linux-x64-musl": "0.19.1-beta.0",
108
- "@lancedb/lancedb-linux-arm64-musl": "0.19.1-beta.0",
109
- "@lancedb/lancedb-win32-x64-msvc": "0.19.1-beta.0",
110
- "@lancedb/lancedb-win32-arm64-msvc": "0.19.1-beta.0"
103
+ "@lancedb/lancedb-darwin-x64": "0.19.1-beta.1",
104
+ "@lancedb/lancedb-darwin-arm64": "0.19.1-beta.1",
105
+ "@lancedb/lancedb-linux-x64-gnu": "0.19.1-beta.1",
106
+ "@lancedb/lancedb-linux-arm64-gnu": "0.19.1-beta.1",
107
+ "@lancedb/lancedb-linux-x64-musl": "0.19.1-beta.1",
108
+ "@lancedb/lancedb-linux-arm64-musl": "0.19.1-beta.1",
109
+ "@lancedb/lancedb-win32-x64-msvc": "0.19.1-beta.1",
110
+ "@lancedb/lancedb-win32-arm64-msvc": "0.19.1-beta.1"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "apache-arrow": ">=15.0.0 <=18.1.0"