lakeql 0.1.8 → 0.2.0
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/README.md +57 -61
- package/dist/bin.js +60 -8080
- package/dist/chunk-32PE6IK4.js +20803 -0
- package/dist/{chunk-5K5JMJ2M.js → chunk-3WUY56UD.js} +682 -3
- package/dist/chunk-LWF5FKHB.js +1175 -0
- package/dist/{chunk-TFD5RFKB.js → chunk-WGHR35QU.js} +426 -4
- package/dist/cloudflare.d.ts +1 -1
- package/dist/cloudflare.js +5 -4
- package/dist/{geo-backend-TSQJWAAB.js → geo-backend-WYCTLPNS.js} +1 -1
- package/dist/index.d.ts +581 -338
- package/dist/index.js +4 -3
- package/dist/node.d.ts +1 -1
- package/dist/node.js +48 -9
- package/dist/window-backend-OECETVJ2.js +905 -0
- package/package.json +9 -9
- package/dist/chunk-MXGEAVHL.js +0 -11381
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,19 @@ declare function timestampToIsoString(value: TimestampValue): string;
|
|
|
17
17
|
declare function timestampEpochForUnit(value: TimestampValue, unit: TimestampUnit): bigint;
|
|
18
18
|
declare function compareTimestampValues(left: TimestampValue, right: TimestampValue): number;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
interface IntervalValue {
|
|
21
|
+
kind: "interval";
|
|
22
|
+
months: number;
|
|
23
|
+
days: number;
|
|
24
|
+
nanoseconds: string;
|
|
25
|
+
}
|
|
26
|
+
declare function intervalValue(input: string): IntervalValue;
|
|
27
|
+
declare function isIntervalValue(value: unknown): value is IntervalValue;
|
|
28
|
+
declare function isNonNegativeInterval(value: IntervalValue): boolean;
|
|
29
|
+
declare function intervalToString(value: IntervalValue): string;
|
|
30
|
+
declare function applyIntervalToTimestamp(value: TimestampValue, interval: IntervalValue, direction: -1 | 1): TimestampValue;
|
|
31
|
+
|
|
32
|
+
type Scalar = string | number | boolean | bigint | Uint8Array | TimestampValue | IntervalValue | null;
|
|
21
33
|
type CompareOp = "eq" | "ne" | "lt" | "lte" | "gt" | "gte";
|
|
22
34
|
interface LiteralExpr {
|
|
23
35
|
kind: "literal";
|
|
@@ -116,223 +128,6 @@ declare function mul(left: ValueInput, right: ValueInput): ArithmeticExpr;
|
|
|
116
128
|
declare function div(left: ValueInput, right: ValueInput): ArithmeticExpr;
|
|
117
129
|
declare function mod(left: ValueInput, right: ValueInput): ArithmeticExpr;
|
|
118
130
|
|
|
119
|
-
type Row = Record<string, unknown>;
|
|
120
|
-
interface BookmarkQuery {
|
|
121
|
-
source: string;
|
|
122
|
-
select?: string[];
|
|
123
|
-
projections?: Record<string, Expr>;
|
|
124
|
-
where?: Expr;
|
|
125
|
-
distinct?: boolean;
|
|
126
|
-
orderBy?: {
|
|
127
|
-
column: string;
|
|
128
|
-
direction?: "asc" | "desc";
|
|
129
|
-
nulls?: "first" | "last";
|
|
130
|
-
}[];
|
|
131
|
-
limit?: number;
|
|
132
|
-
offset?: number;
|
|
133
|
-
batchSize?: number;
|
|
134
|
-
hive?: boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* A serializable position in a running query. Bookmarks are plain values:
|
|
138
|
-
* the engine only produces and consumes them, and the caller moves them
|
|
139
|
-
* over whatever transport it likes (queue, KV, URL, cron state).
|
|
140
|
-
*/
|
|
141
|
-
interface Bookmark {
|
|
142
|
-
version: 1;
|
|
143
|
-
planFingerprint: string;
|
|
144
|
-
snapshot: string;
|
|
145
|
-
query?: BookmarkQuery;
|
|
146
|
-
position: {
|
|
147
|
-
fileIndex: number;
|
|
148
|
-
rowGroup: number;
|
|
149
|
-
rowOffset: number;
|
|
150
|
-
taskId?: string;
|
|
151
|
-
outputManifestCursor?: number;
|
|
152
|
-
};
|
|
153
|
-
writeState?: {
|
|
154
|
-
taskState?: "planned" | "running" | "output-written" | "manifest-recorded" | "complete";
|
|
155
|
-
idempotencyKey?: string;
|
|
156
|
-
multipart?: {
|
|
157
|
-
uploadId: string;
|
|
158
|
-
path: string;
|
|
159
|
-
parts: {
|
|
160
|
-
partNumber: number;
|
|
161
|
-
etag: string;
|
|
162
|
-
byteSize: number;
|
|
163
|
-
}[];
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
operatorState?: {
|
|
167
|
-
limitEmitted?: number;
|
|
168
|
-
groupBy?: Uint8Array | {
|
|
169
|
-
spillRef: string;
|
|
170
|
-
};
|
|
171
|
-
topK?: Uint8Array | {
|
|
172
|
-
spillRef: string;
|
|
173
|
-
};
|
|
174
|
-
sort?: Uint8Array | {
|
|
175
|
-
spillRef: string;
|
|
176
|
-
};
|
|
177
|
-
sketches?: Record<string, Uint8Array>;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
interface SliceResult {
|
|
181
|
-
rows: Row[];
|
|
182
|
-
/** Absent when the query completed. */
|
|
183
|
-
bookmark?: Bookmark;
|
|
184
|
-
}
|
|
185
|
-
interface QueryStats {
|
|
186
|
-
queryId: string;
|
|
187
|
-
elapsedMs: number;
|
|
188
|
-
manifestsRead: number;
|
|
189
|
-
manifestsSkipped: number;
|
|
190
|
-
filesPlanned: number;
|
|
191
|
-
filesRead: number;
|
|
192
|
-
filesSkipped: number;
|
|
193
|
-
rowGroupsRead: number;
|
|
194
|
-
rowGroupsSkipped: number;
|
|
195
|
-
columnsRead: string[];
|
|
196
|
-
bytesRequested: number;
|
|
197
|
-
rangeRequests: number;
|
|
198
|
-
rowsDecoded: number;
|
|
199
|
-
rowsMatched: number;
|
|
200
|
-
rowsReturned: number;
|
|
201
|
-
cacheHits: number;
|
|
202
|
-
cacheMisses: number;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
type Vector = {
|
|
206
|
-
type: "null";
|
|
207
|
-
length: number;
|
|
208
|
-
} | {
|
|
209
|
-
type: "f64";
|
|
210
|
-
values: Float64Array;
|
|
211
|
-
valid?: Uint8Array;
|
|
212
|
-
} | {
|
|
213
|
-
type: "i64";
|
|
214
|
-
values: BigInt64Array;
|
|
215
|
-
valid?: Uint8Array;
|
|
216
|
-
} | {
|
|
217
|
-
type: "timestamp";
|
|
218
|
-
values: BigInt64Array;
|
|
219
|
-
unit: TimestampUnit;
|
|
220
|
-
isAdjustedToUTC: boolean;
|
|
221
|
-
valid?: Uint8Array;
|
|
222
|
-
} | {
|
|
223
|
-
type: "bool";
|
|
224
|
-
values: Uint8Array;
|
|
225
|
-
valid?: Uint8Array;
|
|
226
|
-
} | {
|
|
227
|
-
type: "utf8";
|
|
228
|
-
values: string[];
|
|
229
|
-
valid?: Uint8Array;
|
|
230
|
-
} | {
|
|
231
|
-
type: "dict";
|
|
232
|
-
indices: Uint32Array;
|
|
233
|
-
dictionary: Vector;
|
|
234
|
-
valid?: Uint8Array;
|
|
235
|
-
} | {
|
|
236
|
-
type: "list";
|
|
237
|
-
offsets: Int32Array;
|
|
238
|
-
child: Vector;
|
|
239
|
-
valid?: Uint8Array;
|
|
240
|
-
} | {
|
|
241
|
-
type: "struct";
|
|
242
|
-
fields: Record<string, Vector>;
|
|
243
|
-
length: number;
|
|
244
|
-
valid?: Uint8Array;
|
|
245
|
-
} | {
|
|
246
|
-
type: "map";
|
|
247
|
-
offsets: Int32Array;
|
|
248
|
-
keys: Vector;
|
|
249
|
-
values: Vector;
|
|
250
|
-
valid?: Uint8Array;
|
|
251
|
-
};
|
|
252
|
-
interface Batch {
|
|
253
|
-
rowCount: number;
|
|
254
|
-
columns: Record<string, Vector>;
|
|
255
|
-
}
|
|
256
|
-
type Selection = Uint8Array;
|
|
257
|
-
type VectorValue = unknown;
|
|
258
|
-
declare function batchFromColumns(columns: Record<string, ArrayLike<VectorValue>>): Batch;
|
|
259
|
-
declare function batchFromVectors(columns: Record<string, Vector>): Batch;
|
|
260
|
-
declare function vectorFromValues(values: ArrayLike<VectorValue>): Vector;
|
|
261
|
-
declare function materializeBatchRows(batch: Batch): Row[];
|
|
262
|
-
declare function materializeSelectedBatchRows(batch: Batch, selection?: Selection): Row[];
|
|
263
|
-
declare function selectedRowCount(rowCount: number, selection?: Selection): number;
|
|
264
|
-
declare function selectedRowIndices(rowCount: number, selection?: Selection): Iterable<number>;
|
|
265
|
-
declare function predicateSelection(batch: Batch, expr: Expr | undefined): Selection;
|
|
266
|
-
declare function tryPredicateSelection(batch: Batch, expr: Expr | undefined): Selection | undefined;
|
|
267
|
-
declare function vectorValue(vector: Vector, index: number): string | number | bigint | boolean | TimestampValue | unknown[] | Record<string, unknown> | null;
|
|
268
|
-
declare function vectorLength(vector: Vector): number;
|
|
269
|
-
interface BatchExprValues {
|
|
270
|
-
rowCount: number;
|
|
271
|
-
vector?: Vector;
|
|
272
|
-
literal?: Scalar;
|
|
273
|
-
valueAt(index: number): Scalar;
|
|
274
|
-
}
|
|
275
|
-
declare function batchExprValues(batch: Batch, expr: Expr): BatchExprValues;
|
|
276
|
-
declare function scalarVectorValue(vector: Vector, index: number): Scalar;
|
|
277
|
-
|
|
278
|
-
declare const ERROR_CODES: readonly ["LAKEQL_PARSE_ERROR", "LAKEQL_SQL_UNSUPPORTED", "LAKEQL_TYPE_ERROR", "LAKEQL_UNKNOWN_TABLE", "LAKEQL_UNKNOWN_COLUMN", "LAKEQL_UNSUPPORTED_PUSHDOWN", "LAKEQL_BUDGET_EXCEEDED", "LAKEQL_GROUP_LIMIT_EXCEEDED", "LAKEQL_OBJECT_NOT_FOUND", "LAKEQL_CATALOG_ERROR", "LAKEQL_UNSUPPORTED_ICEBERG_FEATURE", "LAKEQL_UNSUPPORTED_PARQUET_FEATURE", "LAKEQL_ICEBERG_COMMIT_CONFLICT", "LAKEQL_UNSUPPORTED_DELETE_FILES", "LAKEQL_PARQUET_READ_ERROR", "LAKEQL_PARQUET_WRITE_ERROR", "LAKEQL_VALIDATION_ERROR", "LAKEQL_BOOKMARK_STALE", "LAKEQL_BOOKMARK_INVALID", "LAKEQL_ABORTED", "LAKEQL_GEO_BACKEND_MISSING"];
|
|
279
|
-
type LakeqlErrorCode = (typeof ERROR_CODES)[number];
|
|
280
|
-
type ErrorDetails = Record<string, unknown>;
|
|
281
|
-
declare class LakeqlError extends Error {
|
|
282
|
-
readonly code: LakeqlErrorCode;
|
|
283
|
-
readonly details: ErrorDetails;
|
|
284
|
-
constructor(code: LakeqlErrorCode, message: string, details?: ErrorDetails);
|
|
285
|
-
}
|
|
286
|
-
declare function isLakeqlError(value: unknown): value is LakeqlError;
|
|
287
|
-
|
|
288
|
-
type SqlBoolean = boolean | null;
|
|
289
|
-
/** External geometry/H3 primitives the evaluator can't compute from bbox math alone. */
|
|
290
|
-
interface GeoBackend {
|
|
291
|
-
booleanContains(a: GeoJsonGeometry, b: GeoJsonGeometry): boolean;
|
|
292
|
-
booleanIntersects(a: GeoJsonGeometry, b: GeoJsonGeometry): boolean;
|
|
293
|
-
cellToParent(cell: string, res: number): string;
|
|
294
|
-
gridDisk(origin: string, k: number): string[];
|
|
295
|
-
isValidCell(cell: string): boolean;
|
|
296
|
-
latLngToCell(lat: number, lon: number, res: number): string;
|
|
297
|
-
}
|
|
298
|
-
/** Install the backend. Called by `./geo-backend.ts` once its libraries load. */
|
|
299
|
-
declare function setGeoBackend(backend: GeoBackend): void;
|
|
300
|
-
declare function requireGeoBackend(): GeoBackend;
|
|
301
|
-
/** Force-load the geo backend (idempotent). Exposed for direct evaluate() callers. */
|
|
302
|
-
declare function loadGeoBackend(): Promise<void>;
|
|
303
|
-
/**
|
|
304
|
-
* Load the geo backend iff any of `exprs` uses a backend-requiring spatial
|
|
305
|
-
* function. Cheap no-op once the backend is installed or when no geo is present,
|
|
306
|
-
* so query execution can call it unconditionally.
|
|
307
|
-
*/
|
|
308
|
-
declare function ensureGeoBackendForExprs(exprs: Iterable<Expr | undefined>): Promise<void>;
|
|
309
|
-
type EvalValue = Scalar;
|
|
310
|
-
interface BBox {
|
|
311
|
-
minx: number;
|
|
312
|
-
miny: number;
|
|
313
|
-
maxx: number;
|
|
314
|
-
maxy: number;
|
|
315
|
-
}
|
|
316
|
-
declare function evaluate(expr: Expr, row: Row): EvalValue;
|
|
317
|
-
declare function matches(expr: Expr | undefined, row: Row): boolean;
|
|
318
|
-
declare function jsonSafeValue(value: unknown): unknown;
|
|
319
|
-
declare function encodeJsonLine(row: Row): Uint8Array;
|
|
320
|
-
declare function envelopeOf(geometry: GeoJsonGeometry): BBox;
|
|
321
|
-
type GeoJsonGeometry = {
|
|
322
|
-
type: "Point";
|
|
323
|
-
coordinates: [number, number];
|
|
324
|
-
} | {
|
|
325
|
-
type: "LineString";
|
|
326
|
-
coordinates: [number, number][];
|
|
327
|
-
} | {
|
|
328
|
-
type: "Polygon";
|
|
329
|
-
coordinates: [number, number][][];
|
|
330
|
-
};
|
|
331
|
-
declare function toGeometry(parsed: Record<string, unknown>, name: string): GeoJsonGeometry;
|
|
332
|
-
declare function parseGeometry(value: EvalValue, name: string): Record<string, unknown>;
|
|
333
|
-
declare function envelopeFromGeometry(parsed: Record<string, unknown>, name: string): BBox;
|
|
334
|
-
declare function bboxIntersects(left: BBox, right: BBox): boolean;
|
|
335
|
-
|
|
336
131
|
interface PutOptions {
|
|
337
132
|
contentType?: string;
|
|
338
133
|
metadata?: Record<string, string>;
|
|
@@ -650,6 +445,82 @@ declare function buildBBoxIndex<T extends Record<string, unknown>>(rows: T[], co
|
|
|
650
445
|
maxy: string;
|
|
651
446
|
}): BBoxIndex;
|
|
652
447
|
|
|
448
|
+
interface WindowReadColumnInput {
|
|
449
|
+
select?: string[];
|
|
450
|
+
orderBy?: OrderByTerm[];
|
|
451
|
+
projections?: Record<string, Expr>;
|
|
452
|
+
windows?: Record<string, WindowExpr>;
|
|
453
|
+
where?: Expr;
|
|
454
|
+
qualify?: Expr;
|
|
455
|
+
}
|
|
456
|
+
interface CompatibleWindowSortItem {
|
|
457
|
+
expr: WindowExpr;
|
|
458
|
+
}
|
|
459
|
+
interface CompatibleWindowSortGroup<T extends CompatibleWindowSortItem> {
|
|
460
|
+
sortExpr: WindowExpr;
|
|
461
|
+
items: T[];
|
|
462
|
+
}
|
|
463
|
+
type WindowTaskPlan = {
|
|
464
|
+
topology: "window-partition-fanout";
|
|
465
|
+
available: true;
|
|
466
|
+
bucketCount: number;
|
|
467
|
+
partitionBy: Expr[];
|
|
468
|
+
} | {
|
|
469
|
+
topology: "window-partition-fanout";
|
|
470
|
+
available: false;
|
|
471
|
+
bucketCount: 1;
|
|
472
|
+
reason: string;
|
|
473
|
+
};
|
|
474
|
+
interface WindowExplainPlan {
|
|
475
|
+
expressions: number;
|
|
476
|
+
sortGroups: number;
|
|
477
|
+
qualify: boolean;
|
|
478
|
+
execution: WindowExecutionMode;
|
|
479
|
+
workUnits: WindowTaskPlan;
|
|
480
|
+
}
|
|
481
|
+
type WindowExecutionMode = "row-materialized" | "vector-window" | "parquet-work-unit-fanout";
|
|
482
|
+
declare function windowReadColumns(input: WindowReadColumnInput): string[] | undefined;
|
|
483
|
+
declare function windowExpressions(windows: Record<string, WindowExpr> | undefined): Expr[];
|
|
484
|
+
declare function collectWindowColumns(expr: WindowExpr, columns: Set<string>): void;
|
|
485
|
+
declare function compatibleWindowSortGroups<T extends CompatibleWindowSortItem>(items: readonly T[]): CompatibleWindowSortGroup<T>[];
|
|
486
|
+
declare function windowSortGroupCount(windows: Record<string, WindowExpr>): number;
|
|
487
|
+
declare function windowTaskPlanForWindows(windows: Record<string, WindowExpr>, plannedBucketCount: number): WindowTaskPlan;
|
|
488
|
+
declare function windowSortSpecsCompatible(left: WindowExpr, right: WindowExpr): boolean;
|
|
489
|
+
|
|
490
|
+
interface WindowOptions {
|
|
491
|
+
operatorState?: Uint8Array | WindowOperatorState | {
|
|
492
|
+
spillRef: string;
|
|
493
|
+
};
|
|
494
|
+
spill?: SpillAdapter;
|
|
495
|
+
spillId?: string;
|
|
496
|
+
}
|
|
497
|
+
interface WindowResult {
|
|
498
|
+
rows: Row[];
|
|
499
|
+
operatorState: Uint8Array;
|
|
500
|
+
operatorSpill?: SpillRef;
|
|
501
|
+
}
|
|
502
|
+
interface WindowOperatorState {
|
|
503
|
+
version: 1;
|
|
504
|
+
windows: Record<string, WindowExpr>;
|
|
505
|
+
rows?: Record<string, WindowSnapshotValue>[];
|
|
506
|
+
runs?: WindowRunState[];
|
|
507
|
+
}
|
|
508
|
+
type WindowSnapshotValue = string | number | boolean | null;
|
|
509
|
+
type WindowRunState = {
|
|
510
|
+
rows: Record<string, WindowSnapshotValue>[];
|
|
511
|
+
} | {
|
|
512
|
+
spillRef: string;
|
|
513
|
+
rowCount: number;
|
|
514
|
+
byteSize: number;
|
|
515
|
+
};
|
|
516
|
+
declare function serializeWindowOperatorState(state: WindowOperatorState): Uint8Array;
|
|
517
|
+
declare function deserializeWindowOperatorState(bytes: Uint8Array | WindowOperatorState): WindowOperatorState;
|
|
518
|
+
declare function windowRowsFromState(windows: Record<string, WindowExpr>, options: WindowOptions): Promise<Row[]>;
|
|
519
|
+
declare function windowOperatorState(windows: Record<string, WindowExpr>, rows: Row[]): WindowOperatorState;
|
|
520
|
+
declare function windowOperatorStateFromRuns(windows: Record<string, WindowExpr>, runs: readonly Row[][], spill: SpillAdapter | undefined, spillId: string): Promise<WindowOperatorState>;
|
|
521
|
+
|
|
522
|
+
declare function parseJsonQuery(input: unknown): PathQueryInit;
|
|
523
|
+
|
|
653
524
|
interface QueryBudget {
|
|
654
525
|
maxFiles?: number;
|
|
655
526
|
maxBytes?: number;
|
|
@@ -659,6 +530,8 @@ interface QueryBudget {
|
|
|
659
530
|
maxElapsedMs?: number;
|
|
660
531
|
/** Maximum rows an operator may buffer in memory for orderBy/top-k work. */
|
|
661
532
|
maxBufferedRows?: number;
|
|
533
|
+
/** Maximum rows a single window partition may retain during window evaluation. */
|
|
534
|
+
maxWindowPartitionRows?: number;
|
|
662
535
|
/** Maximum deterministic serialized bytes an in-memory operator may retain. */
|
|
663
536
|
maxMemoryBytes?: number;
|
|
664
537
|
/** Maximum object-store reads allowed to be in flight at once. */
|
|
@@ -690,6 +563,7 @@ interface LakeConfig {
|
|
|
690
563
|
interface ScanOptions {
|
|
691
564
|
columns?: string[];
|
|
692
565
|
where?: Expr;
|
|
566
|
+
object?: ObjectInfo;
|
|
693
567
|
rowStart?: number;
|
|
694
568
|
rowEnd?: number;
|
|
695
569
|
canStopEarly?: boolean;
|
|
@@ -704,7 +578,22 @@ interface ScanAdapter {
|
|
|
704
578
|
scanColumns?(path: string, options: ScanOptions): AsyncIterable<Batch>;
|
|
705
579
|
scanVectorBatches?(path: string, options: ScanOptions): AsyncIterable<ScanVectorBatch>;
|
|
706
580
|
scanColumnBatches?(path: string, options: ScanOptions): AsyncIterable<ScanColumnBatch>;
|
|
581
|
+
planObjects?(objects: ObjectInfo[], options: ScanObjectPlanOptions): Promise<ObjectInfo[]>;
|
|
707
582
|
planTask?(path: string, options: ScanTaskPlanOptions): Promise<ScanTaskPlan>;
|
|
583
|
+
executeWindowTasks?(tasks: TaskInput[], windows: Record<string, WindowExpr>, options: WindowTaskExecutionOptions): Promise<Row[]>;
|
|
584
|
+
}
|
|
585
|
+
interface ScanObjectPlanOptions {
|
|
586
|
+
columns?: string[];
|
|
587
|
+
where?: Expr;
|
|
588
|
+
}
|
|
589
|
+
interface WindowTaskExecutionOptions {
|
|
590
|
+
budget: QueryBudget;
|
|
591
|
+
stats: QueryStats;
|
|
592
|
+
now: () => number;
|
|
593
|
+
startedAt: number;
|
|
594
|
+
batchSize: number;
|
|
595
|
+
maxConcurrentTasks?: number;
|
|
596
|
+
maxBufferedPartials?: number;
|
|
708
597
|
}
|
|
709
598
|
interface ScanVectorBatch {
|
|
710
599
|
rowOffset: number;
|
|
@@ -733,6 +622,8 @@ interface PathQueryInit {
|
|
|
733
622
|
projections?: Record<string, Expr>;
|
|
734
623
|
where?: Expr;
|
|
735
624
|
distinct?: boolean;
|
|
625
|
+
windows?: Record<string, WindowExpr>;
|
|
626
|
+
qualify?: Expr;
|
|
736
627
|
orderBy?: OrderByTerm[];
|
|
737
628
|
limit?: number;
|
|
738
629
|
offset?: number;
|
|
@@ -894,6 +785,7 @@ interface TaskInput {
|
|
|
894
785
|
projectedColumns?: string[];
|
|
895
786
|
residualPredicate?: Expr;
|
|
896
787
|
partitionValues: Record<string, string>;
|
|
788
|
+
window?: WindowTaskPlan;
|
|
897
789
|
}
|
|
898
790
|
interface ExplainJson {
|
|
899
791
|
queryId: string;
|
|
@@ -901,6 +793,7 @@ interface ExplainJson {
|
|
|
901
793
|
filesSkipped: number;
|
|
902
794
|
projectedColumns: string[];
|
|
903
795
|
predicatePlan: PredicatePlan;
|
|
796
|
+
windowPlan?: WindowExplainPlan;
|
|
904
797
|
tasks: TaskInput[];
|
|
905
798
|
}
|
|
906
799
|
interface ExplainResult {
|
|
@@ -941,137 +834,404 @@ type JsonExpr = {
|
|
|
941
834
|
} | {
|
|
942
835
|
between: [string, unknown, unknown];
|
|
943
836
|
} | {
|
|
944
|
-
isNull: string;
|
|
837
|
+
isNull: string;
|
|
838
|
+
} | {
|
|
839
|
+
isNotNull: string;
|
|
840
|
+
} | {
|
|
841
|
+
like: [string, string];
|
|
842
|
+
} | {
|
|
843
|
+
ilike: [string, string];
|
|
844
|
+
} | {
|
|
845
|
+
and: JsonExpr[];
|
|
846
|
+
} | {
|
|
847
|
+
or: JsonExpr[];
|
|
848
|
+
} | {
|
|
849
|
+
not: JsonExpr;
|
|
850
|
+
};
|
|
851
|
+
declare class Lake {
|
|
852
|
+
readonly store: ObjectStore;
|
|
853
|
+
private readonly scanner;
|
|
854
|
+
private readonly budget;
|
|
855
|
+
private readonly policy;
|
|
856
|
+
private readonly now;
|
|
857
|
+
private readonly queryId;
|
|
858
|
+
private readonly substrate;
|
|
859
|
+
private readonly sidecarIndex;
|
|
860
|
+
private readonly planningCache;
|
|
861
|
+
constructor(config: LakeConfig);
|
|
862
|
+
path(source: string): QueryBuilder;
|
|
863
|
+
hive(source: string): QueryBuilder;
|
|
864
|
+
query(input: JsonQueryV1): QueryBuilder;
|
|
865
|
+
resume(bookmark: Bookmark): ResumedQuery;
|
|
866
|
+
createResult(init: PathQueryInit): QueryResult;
|
|
867
|
+
}
|
|
868
|
+
declare class ResumedQuery {
|
|
869
|
+
private readonly lake;
|
|
870
|
+
private readonly bookmark;
|
|
871
|
+
constructor(lake: Lake, bookmark: Bookmark);
|
|
872
|
+
run(options: QueryRunOptions): Promise<SliceResult>;
|
|
873
|
+
}
|
|
874
|
+
declare class QueryBuilder {
|
|
875
|
+
private readonly lake;
|
|
876
|
+
private readonly init;
|
|
877
|
+
constructor(lake: Lake, init: PathQueryInit);
|
|
878
|
+
select(columns: string[]): QueryBuilder;
|
|
879
|
+
project(projections: Record<string, Expr>): QueryBuilder;
|
|
880
|
+
window(alias: string, expr: WindowExpr): QueryBuilder;
|
|
881
|
+
qualify(expr: Expr): QueryBuilder;
|
|
882
|
+
where(expr: Expr): QueryBuilder;
|
|
883
|
+
distinct(enabled?: boolean): QueryBuilder;
|
|
884
|
+
orderBy(terms: OrderByTerm[]): QueryBuilder;
|
|
885
|
+
limit(limit: number): QueryBuilder;
|
|
886
|
+
offset(offset: number): QueryBuilder;
|
|
887
|
+
batchSize(batchSize: number): QueryBuilder;
|
|
888
|
+
explain(): Promise<ExplainResult>;
|
|
889
|
+
planTasks(): Promise<TaskInput[]>;
|
|
890
|
+
taskManifest(jobId?: string): Promise<TaskManifest>;
|
|
891
|
+
run(): QueryResult;
|
|
892
|
+
run(options: QueryRunOptions): Promise<SliceResult>;
|
|
893
|
+
rows(): AsyncIterable<Row>;
|
|
894
|
+
batches(): AsyncIterable<Row[]>;
|
|
895
|
+
toArray(): Promise<Row[]>;
|
|
896
|
+
topKWithState(options?: TopKOptions): Promise<TopKResult>;
|
|
897
|
+
sortWithState(options?: SortOptions): Promise<SortResult>;
|
|
898
|
+
windowWithState(options?: WindowOptions): Promise<WindowResult>;
|
|
899
|
+
first(): Promise<Row | undefined>;
|
|
900
|
+
count(): Promise<number>;
|
|
901
|
+
streamNdjson(): ReadableStream<Uint8Array>;
|
|
902
|
+
streamJson(): ReadableStream<Uint8Array>;
|
|
903
|
+
streamCsv(options?: CsvStreamOptions): ReadableStream<Uint8Array>;
|
|
904
|
+
resumableBatches(options: ResumableBatchOptions): AsyncIterable<SliceResult>;
|
|
905
|
+
groupBy(columns: string[]): AggregationBuilder;
|
|
906
|
+
}
|
|
907
|
+
declare class AggregationBuilder {
|
|
908
|
+
private readonly result;
|
|
909
|
+
private readonly columns;
|
|
910
|
+
constructor(result: QueryResult, columns: string[]);
|
|
911
|
+
aggregate(spec: AggregateSpec, options?: AggregateOptions): Promise<Row[]>;
|
|
912
|
+
aggregateWithState(spec: AggregateSpec, options?: AggregateOptions): Promise<AggregateResult>;
|
|
913
|
+
}
|
|
914
|
+
interface QueryResultConfig extends PathQueryInit {
|
|
915
|
+
lake: Lake;
|
|
916
|
+
bookmarkQuery: BookmarkQuery;
|
|
917
|
+
scanner: ScanAdapter;
|
|
918
|
+
budget: QueryBudget;
|
|
919
|
+
now: () => number;
|
|
920
|
+
queryId: string;
|
|
921
|
+
metrics?: MetricsHook;
|
|
922
|
+
sidecarIndex?: SidecarFileIndex[];
|
|
923
|
+
planningCache?: CacheAdapter<ObjectInfo[]>;
|
|
924
|
+
}
|
|
925
|
+
declare class QueryResult {
|
|
926
|
+
readonly stats: QueryStats;
|
|
927
|
+
private readonly config;
|
|
928
|
+
constructor(config: QueryResultConfig);
|
|
929
|
+
rows(): AsyncIterable<Row>;
|
|
930
|
+
private matchedRows;
|
|
931
|
+
batches(): AsyncIterable<Row[]>;
|
|
932
|
+
private windowedBatches;
|
|
933
|
+
private windowRunnerOptions;
|
|
934
|
+
private tryColumnarProjectedBatches;
|
|
935
|
+
private columnarProjectedBatches;
|
|
936
|
+
private lateMaterializedLimitRows;
|
|
937
|
+
toArray(): Promise<Row[]>;
|
|
938
|
+
topKWithState(options?: TopKOptions): Promise<TopKResult>;
|
|
939
|
+
sortWithState(options?: SortOptions): Promise<SortResult>;
|
|
940
|
+
windowWithState(options?: WindowOptions): Promise<WindowResult>;
|
|
941
|
+
first(): Promise<Row | undefined>;
|
|
942
|
+
count(): Promise<number>;
|
|
943
|
+
planTasks(): Promise<TaskInput[]>;
|
|
944
|
+
taskManifest(jobId?: string): Promise<TaskManifest>;
|
|
945
|
+
slice(options: SliceOptions): Promise<SliceResult>;
|
|
946
|
+
resumableBatches(options: ResumableBatchOptions): AsyncIterable<SliceResult>;
|
|
947
|
+
aggregate(groupColumns: string[], spec: AggregateSpec, options?: AggregateOptions): Promise<Row[]>;
|
|
948
|
+
private tryColumnarAggregateRows;
|
|
949
|
+
private tryLateMaterializedAggregateRows;
|
|
950
|
+
private aggregateMaterializedRows;
|
|
951
|
+
aggregateWithState(groupColumns: string[], spec: AggregateSpec, options?: AggregateOptions): Promise<AggregateResult>;
|
|
952
|
+
private orderedBatches;
|
|
953
|
+
private tryColumnarTopKRows;
|
|
954
|
+
private tryLateMaterializedTopKRows;
|
|
955
|
+
private materializeRowRefs;
|
|
956
|
+
private columnBatches;
|
|
957
|
+
private collectOrderedMatches;
|
|
958
|
+
private collectSortRuns;
|
|
959
|
+
explain(): Promise<ExplainResult>;
|
|
960
|
+
private tasksFromObjects;
|
|
961
|
+
private planObjects;
|
|
962
|
+
streamNdjson(): ReadableStream<Uint8Array>;
|
|
963
|
+
streamJson(): ReadableStream<Uint8Array>;
|
|
964
|
+
streamCsv(options?: CsvStreamOptions): ReadableStream<Uint8Array>;
|
|
965
|
+
}
|
|
966
|
+
declare function serializeAggregateOperatorState(state: AggregateOperatorState): Uint8Array;
|
|
967
|
+
declare function deserializeAggregateOperatorState(bytes: Uint8Array | AggregateOperatorState): AggregateOperatorState;
|
|
968
|
+
declare function serializeTopKOperatorState(state: TopKOperatorState): Uint8Array;
|
|
969
|
+
declare function serializeSortOperatorState(state: SortOperatorState): Uint8Array;
|
|
970
|
+
declare function deserializeTopKOperatorState(bytes: Uint8Array | TopKOperatorState): TopKOperatorState;
|
|
971
|
+
declare function deserializeSortOperatorState(bytes: Uint8Array | SortOperatorState): SortOperatorState;
|
|
972
|
+
declare function parseHivePartitions(path: string): Record<string, string>;
|
|
973
|
+
|
|
974
|
+
interface WindowOrderTerm {
|
|
975
|
+
expr: Expr;
|
|
976
|
+
direction?: "asc" | "desc";
|
|
977
|
+
nulls?: "first" | "last";
|
|
978
|
+
}
|
|
979
|
+
interface WindowFrameBound {
|
|
980
|
+
kind: "unbounded-preceding" | "preceding" | "current-row" | "following" | "unbounded-following";
|
|
981
|
+
offset?: Expr;
|
|
982
|
+
}
|
|
983
|
+
interface WindowFrame {
|
|
984
|
+
mode: "rows" | "range" | "groups";
|
|
985
|
+
start: WindowFrameBound;
|
|
986
|
+
end: WindowFrameBound;
|
|
987
|
+
exclude: "no-others" | "current-row" | "group" | "ties";
|
|
988
|
+
}
|
|
989
|
+
type WindowRankingFn = "row_number" | "rank" | "dense_rank" | "percent_rank" | "cume_dist" | "ntile";
|
|
990
|
+
type WindowValueFn = "lag" | "lead" | "first_value" | "last_value" | "nth_value";
|
|
991
|
+
type WindowFn = WindowRankingFn | WindowValueFn | {
|
|
992
|
+
aggregate: AggregateOp;
|
|
993
|
+
};
|
|
994
|
+
interface WindowSpec {
|
|
995
|
+
partitionBy: Expr[];
|
|
996
|
+
orderBy: WindowOrderTerm[];
|
|
997
|
+
frame?: WindowFrame;
|
|
998
|
+
}
|
|
999
|
+
interface WindowExpr {
|
|
1000
|
+
fn: WindowFn;
|
|
1001
|
+
args: Expr[];
|
|
1002
|
+
over: WindowSpec;
|
|
1003
|
+
filter?: Expr;
|
|
1004
|
+
ignoreNulls?: boolean;
|
|
1005
|
+
distinct?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
type Row = Record<string, unknown>;
|
|
1009
|
+
interface BookmarkQuery {
|
|
1010
|
+
source: string;
|
|
1011
|
+
select?: string[];
|
|
1012
|
+
projections?: Record<string, Expr>;
|
|
1013
|
+
where?: Expr;
|
|
1014
|
+
distinct?: boolean;
|
|
1015
|
+
windows?: Record<string, WindowExpr>;
|
|
1016
|
+
qualify?: Expr;
|
|
1017
|
+
orderBy?: {
|
|
1018
|
+
column: string;
|
|
1019
|
+
direction?: "asc" | "desc";
|
|
1020
|
+
nulls?: "first" | "last";
|
|
1021
|
+
}[];
|
|
1022
|
+
limit?: number;
|
|
1023
|
+
offset?: number;
|
|
1024
|
+
batchSize?: number;
|
|
1025
|
+
hive?: boolean;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* A serializable position in a running query. Bookmarks are plain values:
|
|
1029
|
+
* the engine only produces and consumes them, and the caller moves them
|
|
1030
|
+
* over whatever transport it likes (queue, KV, URL, cron state).
|
|
1031
|
+
*/
|
|
1032
|
+
interface Bookmark {
|
|
1033
|
+
version: 1;
|
|
1034
|
+
planFingerprint: string;
|
|
1035
|
+
snapshot: string;
|
|
1036
|
+
query?: BookmarkQuery;
|
|
1037
|
+
position: {
|
|
1038
|
+
fileIndex: number;
|
|
1039
|
+
rowGroup: number;
|
|
1040
|
+
rowOffset: number;
|
|
1041
|
+
taskId?: string;
|
|
1042
|
+
outputManifestCursor?: number;
|
|
1043
|
+
};
|
|
1044
|
+
writeState?: {
|
|
1045
|
+
taskState?: "planned" | "running" | "output-written" | "manifest-recorded" | "complete";
|
|
1046
|
+
idempotencyKey?: string;
|
|
1047
|
+
multipart?: {
|
|
1048
|
+
uploadId: string;
|
|
1049
|
+
path: string;
|
|
1050
|
+
parts: {
|
|
1051
|
+
partNumber: number;
|
|
1052
|
+
etag: string;
|
|
1053
|
+
byteSize: number;
|
|
1054
|
+
}[];
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
operatorState?: {
|
|
1058
|
+
limitEmitted?: number;
|
|
1059
|
+
groupBy?: Uint8Array | {
|
|
1060
|
+
spillRef: string;
|
|
1061
|
+
};
|
|
1062
|
+
topK?: Uint8Array | {
|
|
1063
|
+
spillRef: string;
|
|
1064
|
+
};
|
|
1065
|
+
sort?: Uint8Array | {
|
|
1066
|
+
spillRef: string;
|
|
1067
|
+
};
|
|
1068
|
+
sketches?: Record<string, Uint8Array>;
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
interface SliceResult {
|
|
1072
|
+
rows: Row[];
|
|
1073
|
+
/** Absent when the query completed. */
|
|
1074
|
+
bookmark?: Bookmark;
|
|
1075
|
+
}
|
|
1076
|
+
interface QueryStats {
|
|
1077
|
+
queryId: string;
|
|
1078
|
+
elapsedMs: number;
|
|
1079
|
+
manifestsRead: number;
|
|
1080
|
+
manifestsSkipped: number;
|
|
1081
|
+
filesPlanned: number;
|
|
1082
|
+
filesRead: number;
|
|
1083
|
+
filesSkipped: number;
|
|
1084
|
+
rowGroupsRead: number;
|
|
1085
|
+
rowGroupsSkipped: number;
|
|
1086
|
+
columnsRead: string[];
|
|
1087
|
+
bytesRequested: number;
|
|
1088
|
+
rangeRequests: number;
|
|
1089
|
+
rowsDecoded: number;
|
|
1090
|
+
rowsMatched: number;
|
|
1091
|
+
rowsReturned: number;
|
|
1092
|
+
cacheHits: number;
|
|
1093
|
+
cacheMisses: number;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
type Vector = {
|
|
1097
|
+
type: "null";
|
|
1098
|
+
length: number;
|
|
1099
|
+
} | {
|
|
1100
|
+
type: "f64";
|
|
1101
|
+
values: Float64Array;
|
|
1102
|
+
valid?: Uint8Array;
|
|
1103
|
+
} | {
|
|
1104
|
+
type: "i64";
|
|
1105
|
+
values: BigInt64Array;
|
|
1106
|
+
valid?: Uint8Array;
|
|
1107
|
+
} | {
|
|
1108
|
+
type: "timestamp";
|
|
1109
|
+
values: BigInt64Array;
|
|
1110
|
+
unit: TimestampUnit;
|
|
1111
|
+
isAdjustedToUTC: boolean;
|
|
1112
|
+
valid?: Uint8Array;
|
|
1113
|
+
} | {
|
|
1114
|
+
type: "bool";
|
|
1115
|
+
values: Uint8Array;
|
|
1116
|
+
valid?: Uint8Array;
|
|
945
1117
|
} | {
|
|
946
|
-
|
|
1118
|
+
type: "utf8";
|
|
1119
|
+
values: string[];
|
|
1120
|
+
valid?: Uint8Array;
|
|
947
1121
|
} | {
|
|
948
|
-
|
|
1122
|
+
type: "binary";
|
|
1123
|
+
values: Uint8Array[];
|
|
1124
|
+
valid?: Uint8Array;
|
|
949
1125
|
} | {
|
|
950
|
-
|
|
1126
|
+
type: "dict";
|
|
1127
|
+
indices: Uint32Array;
|
|
1128
|
+
dictionary: Vector;
|
|
1129
|
+
valid?: Uint8Array;
|
|
951
1130
|
} | {
|
|
952
|
-
|
|
1131
|
+
type: "list";
|
|
1132
|
+
offsets: Int32Array;
|
|
1133
|
+
child: Vector;
|
|
1134
|
+
valid?: Uint8Array;
|
|
953
1135
|
} | {
|
|
954
|
-
|
|
1136
|
+
type: "struct";
|
|
1137
|
+
fields: Record<string, Vector>;
|
|
1138
|
+
length: number;
|
|
1139
|
+
valid?: Uint8Array;
|
|
955
1140
|
} | {
|
|
956
|
-
|
|
1141
|
+
type: "map";
|
|
1142
|
+
offsets: Int32Array;
|
|
1143
|
+
keys: Vector;
|
|
1144
|
+
values: Vector;
|
|
1145
|
+
valid?: Uint8Array;
|
|
957
1146
|
};
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
private readonly budget;
|
|
962
|
-
private readonly policy;
|
|
963
|
-
private readonly now;
|
|
964
|
-
private readonly queryId;
|
|
965
|
-
private readonly substrate;
|
|
966
|
-
private readonly sidecarIndex;
|
|
967
|
-
private readonly planningCache;
|
|
968
|
-
constructor(config: LakeConfig);
|
|
969
|
-
path(source: string): QueryBuilder;
|
|
970
|
-
hive(source: string): QueryBuilder;
|
|
971
|
-
query(input: JsonQueryV1): QueryBuilder;
|
|
972
|
-
resume(bookmark: Bookmark): ResumedQuery;
|
|
973
|
-
createResult(init: PathQueryInit): QueryResult;
|
|
974
|
-
}
|
|
975
|
-
declare class ResumedQuery {
|
|
976
|
-
private readonly lake;
|
|
977
|
-
private readonly bookmark;
|
|
978
|
-
constructor(lake: Lake, bookmark: Bookmark);
|
|
979
|
-
run(options: QueryRunOptions): Promise<SliceResult>;
|
|
1147
|
+
interface Batch {
|
|
1148
|
+
rowCount: number;
|
|
1149
|
+
columns: Record<string, Vector>;
|
|
980
1150
|
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
toArray(): Promise<Row[]>;
|
|
1001
|
-
topKWithState(options?: TopKOptions): Promise<TopKResult>;
|
|
1002
|
-
sortWithState(options?: SortOptions): Promise<SortResult>;
|
|
1003
|
-
first(): Promise<Row | undefined>;
|
|
1004
|
-
count(): Promise<number>;
|
|
1005
|
-
streamNdjson(): ReadableStream<Uint8Array>;
|
|
1006
|
-
streamJson(): ReadableStream<Uint8Array>;
|
|
1007
|
-
streamCsv(options?: CsvStreamOptions): ReadableStream<Uint8Array>;
|
|
1008
|
-
resumableBatches(options: ResumableBatchOptions): AsyncIterable<SliceResult>;
|
|
1009
|
-
groupBy(columns: string[]): AggregationBuilder;
|
|
1151
|
+
type Selection = Uint8Array;
|
|
1152
|
+
type VectorValue = unknown;
|
|
1153
|
+
declare function batchFromColumns(columns: Record<string, ArrayLike<VectorValue>>): Batch;
|
|
1154
|
+
declare function batchFromVectors(columns: Record<string, Vector>): Batch;
|
|
1155
|
+
declare function vectorFromValues(values: ArrayLike<VectorValue>): Vector;
|
|
1156
|
+
declare function materializeBatchRows(batch: Batch): Row[];
|
|
1157
|
+
declare function materializeBatchRow(batch: Batch, index: number): Row;
|
|
1158
|
+
declare function materializeSelectedBatchRows(batch: Batch, selection?: Selection): Row[];
|
|
1159
|
+
declare function selectedRowCount(rowCount: number, selection?: Selection): number;
|
|
1160
|
+
declare function selectedRowIndices(rowCount: number, selection?: Selection): Iterable<number>;
|
|
1161
|
+
declare function predicateSelection(batch: Batch, expr: Expr | undefined): Selection;
|
|
1162
|
+
declare function tryPredicateSelection(batch: Batch, expr: Expr | undefined): Selection | undefined;
|
|
1163
|
+
declare function vectorValue(vector: Vector, index: number): string | number | bigint | boolean | Uint8Array | TimestampValue | unknown[] | Record<string, unknown> | null;
|
|
1164
|
+
declare function vectorLength(vector: Vector): number;
|
|
1165
|
+
interface BatchExprValues {
|
|
1166
|
+
rowCount: number;
|
|
1167
|
+
vector?: Vector;
|
|
1168
|
+
literal?: Scalar;
|
|
1169
|
+
valueAt(index: number): Scalar;
|
|
1010
1170
|
}
|
|
1011
|
-
declare
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1171
|
+
declare function batchExprValues(batch: Batch, expr: Expr): BatchExprValues;
|
|
1172
|
+
declare function scalarVectorValue(vector: Vector, index: number): Scalar;
|
|
1173
|
+
|
|
1174
|
+
declare const ERROR_CODES: readonly ["LAKEQL_PARSE_ERROR", "LAKEQL_SQL_UNSUPPORTED", "LAKEQL_TYPE_ERROR", "LAKEQL_UNKNOWN_TABLE", "LAKEQL_UNKNOWN_COLUMN", "LAKEQL_UNSUPPORTED_PUSHDOWN", "LAKEQL_BUDGET_EXCEEDED", "LAKEQL_GROUP_LIMIT_EXCEEDED", "LAKEQL_OBJECT_NOT_FOUND", "LAKEQL_NO_FILES_MATCHED", "LAKEQL_SCHEMA_CONFLICT", "LAKEQL_CATALOG_ERROR", "LAKEQL_UNSUPPORTED_ICEBERG_FEATURE", "LAKEQL_UNSUPPORTED_PARQUET_FEATURE", "LAKEQL_ICEBERG_COMMIT_CONFLICT", "LAKEQL_UNSUPPORTED_DELETE_FILES", "LAKEQL_PARQUET_READ_ERROR", "LAKEQL_PARQUET_WRITE_ERROR", "LAKEQL_VALIDATION_ERROR", "LAKEQL_BOOKMARK_STALE", "LAKEQL_BOOKMARK_INVALID", "LAKEQL_ABORTED", "LAKEQL_GEO_BACKEND_MISSING"];
|
|
1175
|
+
type LakeqlErrorCode = (typeof ERROR_CODES)[number];
|
|
1176
|
+
type ErrorDetails = Record<string, unknown>;
|
|
1177
|
+
declare class LakeqlError extends Error {
|
|
1178
|
+
readonly code: LakeqlErrorCode;
|
|
1179
|
+
readonly details: ErrorDetails;
|
|
1180
|
+
constructor(code: LakeqlErrorCode, message: string, details?: ErrorDetails);
|
|
1017
1181
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1182
|
+
declare function isLakeqlError(value: unknown): value is LakeqlError;
|
|
1183
|
+
|
|
1184
|
+
type SqlBoolean = boolean | null;
|
|
1185
|
+
/** External geometry/H3 primitives the evaluator can't compute from bbox math alone. */
|
|
1186
|
+
interface GeoBackend {
|
|
1187
|
+
booleanContains(a: GeoJsonGeometry, b: GeoJsonGeometry): boolean;
|
|
1188
|
+
booleanIntersects(a: GeoJsonGeometry, b: GeoJsonGeometry): boolean;
|
|
1189
|
+
cellToParent(cell: string, res: number): string;
|
|
1190
|
+
gridDisk(origin: string, k: number): string[];
|
|
1191
|
+
isValidCell(cell: string): boolean;
|
|
1192
|
+
latLngToCell(lat: number, lon: number, res: number): string;
|
|
1028
1193
|
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
slice(options: SliceOptions): Promise<SliceResult>;
|
|
1047
|
-
resumableBatches(options: ResumableBatchOptions): AsyncIterable<SliceResult>;
|
|
1048
|
-
aggregate(groupColumns: string[], spec: AggregateSpec, options?: AggregateOptions): Promise<Row[]>;
|
|
1049
|
-
private tryColumnarAggregateRows;
|
|
1050
|
-
private tryLateMaterializedAggregateRows;
|
|
1051
|
-
private aggregateMaterializedRows;
|
|
1052
|
-
aggregateWithState(groupColumns: string[], spec: AggregateSpec, options?: AggregateOptions): Promise<AggregateResult>;
|
|
1053
|
-
private orderedBatches;
|
|
1054
|
-
private tryColumnarTopKRows;
|
|
1055
|
-
private tryLateMaterializedTopKRows;
|
|
1056
|
-
private materializeRowRefs;
|
|
1057
|
-
private columnBatches;
|
|
1058
|
-
private collectOrderedMatches;
|
|
1059
|
-
private collectSortRuns;
|
|
1060
|
-
explain(): Promise<ExplainResult>;
|
|
1061
|
-
private tasksFromObjects;
|
|
1062
|
-
private planObjects;
|
|
1063
|
-
streamNdjson(): ReadableStream<Uint8Array>;
|
|
1064
|
-
streamJson(): ReadableStream<Uint8Array>;
|
|
1065
|
-
streamCsv(options?: CsvStreamOptions): ReadableStream<Uint8Array>;
|
|
1194
|
+
/** Install the backend. Called by `./geo-backend.ts` once its libraries load. */
|
|
1195
|
+
declare function setGeoBackend(backend: GeoBackend): void;
|
|
1196
|
+
declare function requireGeoBackend(): GeoBackend;
|
|
1197
|
+
/** Force-load the geo backend (idempotent). Exposed for direct evaluate() callers. */
|
|
1198
|
+
declare function loadGeoBackend(): Promise<void>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Load the geo backend iff any of `exprs` uses a backend-requiring spatial
|
|
1201
|
+
* function. Cheap no-op once the backend is installed or when no geo is present,
|
|
1202
|
+
* so query execution can call it unconditionally.
|
|
1203
|
+
*/
|
|
1204
|
+
declare function ensureGeoBackendForExprs(exprs: Iterable<Expr | undefined>): Promise<void>;
|
|
1205
|
+
type EvalValue = Scalar;
|
|
1206
|
+
interface BBox {
|
|
1207
|
+
minx: number;
|
|
1208
|
+
miny: number;
|
|
1209
|
+
maxx: number;
|
|
1210
|
+
maxy: number;
|
|
1066
1211
|
}
|
|
1067
|
-
declare function
|
|
1068
|
-
declare function
|
|
1069
|
-
declare function
|
|
1070
|
-
declare function
|
|
1071
|
-
declare function
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1212
|
+
declare function evaluate(expr: Expr, row: Row): EvalValue;
|
|
1213
|
+
declare function matches(expr: Expr | undefined, row: Row): boolean;
|
|
1214
|
+
declare function jsonSafeValue(value: unknown): unknown;
|
|
1215
|
+
declare function encodeJsonLine(row: Row): Uint8Array;
|
|
1216
|
+
declare function envelopeOf(geometry: GeoJsonGeometry): BBox;
|
|
1217
|
+
type GeoJsonGeometry = {
|
|
1218
|
+
type: "Point";
|
|
1219
|
+
coordinates: [number, number];
|
|
1220
|
+
} | {
|
|
1221
|
+
type: "LineString";
|
|
1222
|
+
coordinates: [number, number][];
|
|
1223
|
+
} | {
|
|
1224
|
+
type: "Polygon";
|
|
1225
|
+
coordinates: [number, number][][];
|
|
1226
|
+
};
|
|
1227
|
+
declare function toGeometry(parsed: Record<string, unknown>, name: string): GeoJsonGeometry;
|
|
1228
|
+
declare function parseGeometry(value: EvalValue, name: string): Record<string, unknown>;
|
|
1229
|
+
declare function envelopeFromGeometry(parsed: Record<string, unknown>, name: string): BBox;
|
|
1230
|
+
declare function bboxIntersects(left: BBox, right: BBox): boolean;
|
|
1231
|
+
declare function bboxDistance(left: BBox, right: BBox): number;
|
|
1232
|
+
declare function geometryDistance(left: GeoJsonGeometry, right: GeoJsonGeometry): number;
|
|
1233
|
+
|
|
1234
|
+
declare function collectExprColumns(expr: Expr | undefined, columns: Set<string>): void;
|
|
1075
1235
|
|
|
1076
1236
|
interface InMemoryTableOptions {
|
|
1077
1237
|
maxRows?: number;
|
|
@@ -1147,6 +1307,8 @@ declare class MemoryObjectStore implements ObjectStore {
|
|
|
1147
1307
|
}
|
|
1148
1308
|
declare function memoryStore(): MemoryObjectStore;
|
|
1149
1309
|
|
|
1310
|
+
declare function isPrototypeMutationKey(key: string): boolean;
|
|
1311
|
+
|
|
1150
1312
|
interface ObjectStoreCacheOptions {
|
|
1151
1313
|
/** Maximum cached object/range bytes retained in memory. Defaults to 64 MiB. */
|
|
1152
1314
|
maxBytes?: number;
|
|
@@ -1391,6 +1553,36 @@ declare function vectorTopKIndices(batch: Batch, orderBy: readonly OrderByTerm[]
|
|
|
1391
1553
|
declare function gatherBatch(batch: Batch, indices: readonly number[]): Batch;
|
|
1392
1554
|
declare function concatBatches(batches: readonly Batch[]): Batch;
|
|
1393
1555
|
|
|
1556
|
+
interface WindowExecutionOptions {
|
|
1557
|
+
estimateMemoryBytes?: (value: unknown) => number;
|
|
1558
|
+
enforceBufferedRows?: (rows: number) => void;
|
|
1559
|
+
enforceWindowPartitionRows?: (rows: number) => void;
|
|
1560
|
+
enforceMemoryBytes?: (bytes: number) => void;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
interface WindowWorkUnitRow {
|
|
1564
|
+
ordinal: WindowWorkUnitOrdinal;
|
|
1565
|
+
row: Row;
|
|
1566
|
+
}
|
|
1567
|
+
interface WindowWorkUnitOrdinal {
|
|
1568
|
+
task: number;
|
|
1569
|
+
row: number;
|
|
1570
|
+
}
|
|
1571
|
+
interface WindowWorkUnitBucket {
|
|
1572
|
+
bucket: number;
|
|
1573
|
+
rows: WindowWorkUnitRow[];
|
|
1574
|
+
}
|
|
1575
|
+
interface WindowWorkUnitPartial {
|
|
1576
|
+
bucketCount: number;
|
|
1577
|
+
buckets: WindowWorkUnitBucket[];
|
|
1578
|
+
}
|
|
1579
|
+
interface WindowWorkUnitEvaluationOptions extends WindowExecutionOptions {
|
|
1580
|
+
bucketCount?: number;
|
|
1581
|
+
}
|
|
1582
|
+
declare function partitionWindowWorkUnitRows(rows: readonly WindowWorkUnitRow[], windows: Record<string, WindowExpr>, bucketCount: number): WindowWorkUnitPartial;
|
|
1583
|
+
declare function evaluateWindowWorkUnitPartials(partials: readonly WindowWorkUnitPartial[], windows: Record<string, WindowExpr>, options?: WindowWorkUnitEvaluationOptions): Promise<Row[]>;
|
|
1584
|
+
declare function windowPartitionBucket(row: Row, windows: Record<string, WindowExpr>, bucketCount: number): number;
|
|
1585
|
+
|
|
1394
1586
|
interface WorkUnitFanInOptions<Input, Partial, Accumulator> {
|
|
1395
1587
|
inputs: readonly Input[];
|
|
1396
1588
|
initial: Accumulator;
|
|
@@ -1791,6 +1983,9 @@ interface ScanParquetTaskOptions {
|
|
|
1791
1983
|
batchSize?: number;
|
|
1792
1984
|
stats?: QueryStats;
|
|
1793
1985
|
metadataCache?: CacheAdapter<ParquetMetadata>;
|
|
1986
|
+
budget?: QueryBudget;
|
|
1987
|
+
now?: () => number;
|
|
1988
|
+
startedAt?: number;
|
|
1794
1989
|
}
|
|
1795
1990
|
interface PlanParquetTaskWorkUnitsOptions {
|
|
1796
1991
|
maxRowGroupsPerTask?: number;
|
|
@@ -1842,11 +2037,13 @@ declare class ParquetScanAdapter implements ScanAdapter {
|
|
|
1842
2037
|
decodedColumnCache?: DecodedColumnCache;
|
|
1843
2038
|
scanRangeCache?: RangeCacheOptions;
|
|
1844
2039
|
});
|
|
2040
|
+
planObjects(objects: ObjectInfo[], _options: ScanObjectPlanOptions): Promise<ObjectInfo[]>;
|
|
1845
2041
|
scan(path: string, options: ScanOptions): AsyncIterable<Row[]>;
|
|
1846
2042
|
scanColumns(path: string, options: ScanOptions): AsyncIterable<Batch>;
|
|
1847
2043
|
scanColumnBatches(path: string, options: ScanOptions): AsyncIterable<ScanColumnBatch>;
|
|
1848
2044
|
scanVectorBatches(path: string, options: ScanOptions): AsyncIterable<ScanVectorBatch>;
|
|
1849
2045
|
planTask(path: string, options: ScanTaskPlanOptions): Promise<ScanTaskPlan>;
|
|
2046
|
+
executeWindowTasks(tasks: TaskInput[], windows: Record<string, WindowExpr>, options: WindowTaskExecutionOptions): Promise<Row[]>;
|
|
1850
2047
|
private metadata;
|
|
1851
2048
|
private scanBuffer;
|
|
1852
2049
|
}
|
|
@@ -1867,6 +2064,16 @@ declare function planParquetTaskWorkUnits(store: ObjectStore, task: TaskInput, o
|
|
|
1867
2064
|
/** Read Parquet footer metadata (row groups, schema, stats). */
|
|
1868
2065
|
declare function readParquetMetadata(store: ObjectStore, path: string, metadataCache?: ScanParquetTaskOptions["metadataCache"]): Promise<ParquetMetadata>;
|
|
1869
2066
|
|
|
2067
|
+
interface WindowParquetTasksOptions extends ScanParquetTaskOptions {
|
|
2068
|
+
bucketCount?: number;
|
|
2069
|
+
budget?: QueryBudget;
|
|
2070
|
+
maxConcurrentTasks?: number;
|
|
2071
|
+
maxBufferedPartials?: number;
|
|
2072
|
+
partialBoundary?(partial: WindowWorkUnitPartial, task: TaskInput, index: number): WindowWorkUnitPartial | Promise<WindowWorkUnitPartial>;
|
|
2073
|
+
}
|
|
2074
|
+
declare function windowParquetTask(store: ObjectStore, task: TaskInput, windows: Record<string, WindowExpr>, index: number, options?: WindowParquetTasksOptions): Promise<WindowWorkUnitPartial>;
|
|
2075
|
+
declare function windowParquetTasks(store: ObjectStore, tasks: TaskInput[], windows: Record<string, WindowExpr>, options?: WindowParquetTasksOptions): Promise<Row[]>;
|
|
2076
|
+
|
|
1870
2077
|
interface PlanParquetRowGroupsOptions {
|
|
1871
2078
|
where?: Expr;
|
|
1872
2079
|
}
|
|
@@ -2026,4 +2233,40 @@ declare function planFiles(table: EngineTable, options?: PlanIcebergFilesOptions
|
|
|
2026
2233
|
declare function scanBatches(plan: EngineFilePlan, options?: ScanEngineOptions): AsyncIterable<ScanBatch>;
|
|
2027
2234
|
declare function scanRows(plan: EngineFilePlan, options?: ScanEngineOptions): AsyncIterable<Row>;
|
|
2028
2235
|
|
|
2029
|
-
|
|
2236
|
+
type SqlParameterValue = Scalar;
|
|
2237
|
+
|
|
2238
|
+
interface SqlQueryOptions {
|
|
2239
|
+
path?: string;
|
|
2240
|
+
tables?: Record<string, string>;
|
|
2241
|
+
parameters?: readonly SqlParameterValue[];
|
|
2242
|
+
joinMaxRightRows?: number;
|
|
2243
|
+
}
|
|
2244
|
+
interface SqlCsvOptions {
|
|
2245
|
+
/**
|
|
2246
|
+
* Prefix cells that spreadsheet apps may interpret as formulae. Defaults to
|
|
2247
|
+
* false so CSV remains a faithful data export unless a spreadsheet-targeted
|
|
2248
|
+
* response opts in.
|
|
2249
|
+
*/
|
|
2250
|
+
preventFormulae?: boolean;
|
|
2251
|
+
}
|
|
2252
|
+
type SqlLake = ReturnType<typeof createParquetLake> & {
|
|
2253
|
+
sql(sql: string, options?: SqlQueryOptions): SqlQueryResult;
|
|
2254
|
+
};
|
|
2255
|
+
type ParquetLake = ReturnType<typeof createParquetLake>;
|
|
2256
|
+
declare function createLake(config: ParquetLakeConfig): SqlLake;
|
|
2257
|
+
declare function querySql(lake: ParquetLake, sql: string, options?: SqlQueryOptions): SqlQueryResult;
|
|
2258
|
+
declare class SqlQueryResult {
|
|
2259
|
+
private readonly execute;
|
|
2260
|
+
private rowsPromise;
|
|
2261
|
+
constructor(execute: () => Promise<Row[]>);
|
|
2262
|
+
toArray(): Promise<Row[]>;
|
|
2263
|
+
first(): Promise<Row | undefined>;
|
|
2264
|
+
count(): Promise<number>;
|
|
2265
|
+
rows(): AsyncIterable<Row>;
|
|
2266
|
+
batches(): AsyncIterable<Row[]>;
|
|
2267
|
+
streamJson(): ReadableStream<Uint8Array>;
|
|
2268
|
+
streamNdjson(): ReadableStream<Uint8Array>;
|
|
2269
|
+
streamCsv(options?: SqlCsvOptions): ReadableStream<Uint8Array>;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
export { type AggregateExpr, type AggregateGroupSnapshot, type AggregateOp, type AggregateOperatorState, type AggregateOptions, type AggregateParquetGroupTaskOptions, type AggregateParquetGroupTasksOptions, type AggregateParquetTaskOptions, type AggregateParquetTasksOptions, type AggregateResult, type AggregateSnapshotValue, type AggregateSpec, type AggregateStateSnapshot, AggregationBuilder, type ApplyIcebergDeletesOptions, type ArithmeticExpr, type BBox, type BBoxIndex, type Batch, type BatchExprValues, type BetweenExpr, type Bookmark, type BookmarkInit, type BookmarkPosition, type BookmarkQuery, type BroadcastJoinOptions, type CacheAdapter, CacheApiCache, type CacheApiCacheOptions, type CacheEntry, type CachePolicy, type CallExpr, type CaseExpr, type CaseWhenExpr, type CheckpointAdapter, type CheckpointStore, type Clock, type ColumnExpr, type ColumnInput, type CompareExpr, type CompareOp, type CompatibleWindowSortGroup, type CompatibleWindowSortItem, type ConditionalObjectStore, type ConditionalPutOptions, type CreateParquetTableAsOptions, type CreateParquetTableAsQuery, type CreateParquetTableAsResult, type CsvStreamOptions, type DecodedIcebergDeletes, type DecodedIcebergParquetDeletes, ERROR_CODES, type EngineFilePlan, type EngineTable, type ErrorDetails, type ExplainJson, type ExplainResult, type Expr, type GeoBackend, type GeoJsonGeometry, type IcebergAppendFile, type IcebergAppendOptions, type IcebergAppendOutputManifestOptions, type IcebergAppendResult, type IcebergCatalog, type IcebergCommitCatalog, type IcebergCommitInput, type IcebergCommitResult, type IcebergDeleteFile, type IcebergDeletionVector, type IcebergEnginePlan, type IcebergEngineTable, type IcebergEqualityDelete, type IcebergField, type IcebergGlueCatalogOptions, type IcebergLoadTableOptions, type IcebergNessieCatalogOptions, type IcebergParquetDeleteFile, type IcebergParquetDeleteFileContent, type IcebergPartitionField, type IcebergPartitionSpec, type IcebergPlan, type IcebergPositionDelete, type IcebergReadMode, type IcebergRestAccessDelegation, IcebergRestCatalog, type IcebergRestCatalogConfig, type IcebergRestCatalogOptions, type IcebergRestLoadContext, type IcebergRestLoadTableOptions, type IcebergRestLoadTableResult, type IcebergRestStorageCredential, type IcebergRowBatch, type IcebergSortOrder, IcebergTable, type IcebergTableIdentifier, IcebergUnsupportedCatalog, type IdGenerator, type InExpr, type InMemoryLakeOptions, InMemoryRowsScanner, InMemoryRowsStore, type InMemoryTableOptions, type IndexPruneResult, type IndexValue, type InsertValidationRules, type IntervalValue, type JoinKey, type JoinType, type JsonExpr, type JsonOrderByTerm, type JsonQueryV1, Lake, type LakeConfig, LakeqlError, type LakeqlErrorCode, type LikeExpr, type ListOptions, type LiteralExpr, type LoadIcebergEngineTableOptions, type LoadIcebergTableFromObjectStoreOptions, type LoadIcebergTableFromRestOptions, type LoadIcebergTableOptions, type LoadParquetEngineTableOptions, type LoadTableOptions, type LockAdapter, type LogHook, type LogicalExpr, type LookupJoinFunction, type LookupJoinOptions, type Manifest, type ManifestDeleteFile, type ManifestFile, MemoryCache, MemoryCheckpointAdapter, MemoryObjectStore, MemorySpillAdapter, type MemorySpillAdapterOptions, type MetadataFile, type MetricsHook, type MinMaxColumnIndex, type NotExpr, type NullCheckExpr, type ObjectHead, type ObjectInfo, type ObjectStore, type ObjectStoreCacheOptions, ObjectStoreIcebergCommitCatalog, ObjectStoreJsonCache, type ObjectStoreJsonCacheOptions, type ObjectStoreReadControls, type ObjectStoreUriAuthority, type OperatorSnapshotValue, type OrderByTerm, type OutputManifest, type OutputManifestEntry, PACKAGE, type ParquetColumnBatch, type ParquetEnginePlan, type ParquetEngineTable, type ParquetLakeConfig, type ParquetMetadata, type ParquetRowBatch, type ParquetRowGroupPlan, ParquetScanAdapter, type PartitionedParquetOutputEntryOptions, type PathQueryInit, type PlanIcebergFilesOptions, type PlanParquetRowGroupsOptions, type PlanParquetTaskWorkUnitsOptions, type PlannedIcebergFile, type PlannedParquetRowGroup, type PredicatePlan, type PredicatePlanOptions, type ProjectIcebergRowOptions, type PutOptions, type QueryBudget, QueryBuilder, type QueryPolicy, type QueryPolicyContext, QueryResult, type QueryRunOptions, type QueryStats, type QueueAdapter, type ReadParquetBatchOptions, type ReadParquetOptions, type ResumableBatchOptions, ResumedQuery, type Row, type RuntimeSubstrate, type Scalar, type ScanAdapter, type ScanBatch, type ScanColumnBatch, type ScanEngineOptions, type ScanObjectPlanOptions, type ScanOptions, type ScanParquetTaskOptions, type ScanPlannedIcebergRowsOptions, type ScanTaskPlan, type ScanTaskPlanOptions, type ScanVectorBatch, type Selection, type SharedCacheEntry, type SharedCacheSetOptions, SharedMemoryCache, type SidecarFileIndex, type SliceOptions, type SliceResult, type Snapshot, type SortOperatorState, type SortOptions, type SortResult, type SortRunState, type SpillAdapter, type SpillRef, type SpillUsage, type SqlBoolean, type SqlCsvOptions, type SqlLake, type SqlQueryOptions, SqlQueryResult, type TaskCheckpoint, type TaskInput, type TaskManifest, type TaskManifestTask, type TaskState, type TaskTransitionInput, type TimestampUnit, TimestampValue, type TopKOperatorState, type TopKOptions, type TopKResult, type ValueInput, type Vector, type VectorAggregateOptions, type VectorAggregateSnapshotValue, type VectorAggregateState, type VectorAggregateStateSnapshot, type VectorAggregateStateSnapshots, type VectorAggregateStates, type VectorAggregateValue, type VectorGroup, type VectorGroupByGroupSnapshot, type VectorGroupByOptions, type VectorGroupBySnapshotValue, type VectorGroupByState, type VectorGroupByStateSnapshot, type VectorHashJoinOptions, type VectorProjectionSpec, type VectorTopKOptions, type WindowExecutionMode, type WindowExplainPlan, type WindowExpr, type WindowFn, type WindowFrame, type WindowFrameBound, type WindowOperatorState, type WindowOptions, type WindowOrderTerm, type WindowParquetTasksOptions, type WindowRankingFn, type WindowReadColumnInput, type WindowResult, type WindowRunState, type WindowSnapshotValue, type WindowSpec, type WindowTaskExecutionOptions, type WindowTaskPlan, type WindowValueFn, type WindowWorkUnitBucket, type WindowWorkUnitEvaluationOptions, type WindowWorkUnitOrdinal, type WindowWorkUnitPartial, type WindowWorkUnitRow, type WorkUnitFanInOptions, type WriteParquetOptions, type WriteParquetRowsOptions, type WritePartitionedParquetFile, type WritePartitionedParquetResult, type WritePartitionedParquetTaskOptions, type WritePartitionedParquetTaskResult, add, advanceTaskCheckpoint, aggregateParquetGroupTask, aggregateParquetGroupTasks, aggregateParquetGroupTasksBatch, aggregateParquetTask, aggregateParquetTasks, and, applyIcebergDeletes, applyIntervalToTimestamp, assertBookmarkMatches, asyncBufferFromStore, batchExprValues, batchFromColumns, batchFromVectors, bboxDistance, bboxIntersects, bboxMayIntersect, between, broadcastJoin, buildBBoxIndex, buildMinMaxIndex, cacheApiCache, cachedObjectStore, classifyPredicate, col, collectExprColumns, collectWindowColumns, compareTimestampValues, compatibleWindowSortGroups, concatBatches, createBookmark, createInMemoryLake, createLake, createOutputManifest, createOutputManifestFromCheckpoints, createParquetLake, createParquetTableAs, createTaskManifest, createVectorAggregateStates, createVectorGroupByState, deserializeAggregateOperatorState, deserializeSortOperatorState, deserializeTopKOperatorState, deserializeWindowOperatorState, div, encodeJsonLine, enforceVectorGroupByBudget, ensureGeoBackendForExprs, envelopeFromGeometry, envelopeOf, eq, evaluate, evaluateWindowWorkUnitPartials, fanInWorkUnits, finalizeVectorAggregateStates, finalizeVectorGroupByBatch, finalizeVectorGroupByRows, fingerprint, fn, gatherBatch, geometryDistance, getOrCreateVectorGroup, gt, gte, icebergGlueCatalog, icebergNessieCatalog, icebergRestCatalog, ilike, inMemoryRowsScanner, intervalToString, intervalValue, isIn, isIntervalValue, isLakeqlError, isNonNegativeInterval, isNotNull, isNull, isPrototypeMutationKey, isTimestampValue, jsonSafeValue, jsonWorkUnitBoundary, like, lit, loadGeoBackend, loadIcebergTable, loadIcebergTableFromObjectStore, loadIcebergTableFromRest, loadTable, lookupJoin, lt, lte, matches, materializeBatchRow, materializeBatchRows, materializeSelectedBatchRows, memoryCache, memoryCheckpointAdapter, memorySpillAdapter, memoryStore, mergeVectorAggregateStateSnapshots, mergeVectorAggregateStates, mergeVectorGroupByStates, mod, mul, ne, not, notIn, objectStoreJsonCache, or, parquetScanner, parseGeometry, parseHivePartitions, parseJsonQuery, partitionWindowWorkUnitRows, partitionedParquetOutputEntries, planFiles, planParquetTaskWorkUnits, planRowGroups, planRowGroupsFromMetadata, predicateSelection, pruneFilesWithIndex, querySql, readControlSignal, readIcebergParquetDeletes, readOutputManifest, readParquetColumnBatches, readParquetMetadata, readParquetObjectBatches, readParquetObjects, rejectUnsupportedParquetSchema, requireGeoBackend, restoreVectorAggregateStates, restoreVectorGroupByState, rowGroupMayMatch, rowGroupMustMatch, scalarVectorValue, scanBatches, scanParquetTaskBatches, scanParquetTaskColumnBatches, scanPlannedIcebergRows, scanRows, selectedRowCount, selectedRowIndices, serializeAggregateOperatorState, serializeSortOperatorState, serializeTopKOperatorState, serializeWindowOperatorState, setGeoBackend, signPaginationToken, snapshotVectorAggregateStates, snapshotVectorGroupByState, stableStringify, sub, throwIfAborted, timestampEpochForUnit, timestampFromEpoch, timestampToIsoString, timestampValueFromIso, toGeometry, transitionTaskCheckpoint, tryPredicateSelection, updateVectorAggregateStateValue, updateVectorAggregateStates, updateVectorGroupAggregateValue, updateVectorGroupByState, uriObjectStore, vectorAggregateBatch, vectorFromValues, vectorGroupByBatch, vectorHashJoin, vectorLength, vectorOrderByBatch, vectorProjectBatch, vectorSortIndices, vectorTopKBatch, vectorTopKIndices, vectorValue, verifyPaginationToken, windowExpressions, windowOperatorState, windowOperatorStateFromRuns, windowParquetTask, windowParquetTasks, windowPartitionBucket, windowReadColumns, windowRowsFromState, windowSortGroupCount, windowSortSpecsCompatible, windowTaskPlanForWindows, withObjectStoreReadControls, writeOutputManifest, writeParquet, writePartitionedParquet, writePartitionedParquetTask };
|