databonk 0.2.0 → 0.2.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.
@@ -200,6 +200,18 @@ interface Dictionary {
200
200
  * would detach it, ADR-001).
201
201
  */
202
202
  declare function writeDictionary(ctx: MemoryContext, uniques: readonly string[]): Dictionary;
203
+ /**
204
+ * Write a dictionary directly from raw UTF-8 bytes and Arrow-style offsets —
205
+ * no JS string decode or encode (ABI §12 ingest note, ADR-002).
206
+ *
207
+ * `rawOffsets[k]..rawOffsets[k+1]` is the byte range of string `k` in
208
+ * `rawBytes`; both arrays are already in our dictionaries' layout. This is a
209
+ * pure bulk-copy: O(count + bytesLen), zero TextDecoder/TextEncoder calls.
210
+ *
211
+ * Allocates both wasm buffers before taking any view so a grow between the two
212
+ * allocs cannot detach a live TypedArray (ADR-001).
213
+ */
214
+ declare function writeDictionaryFromRawBytes(ctx: MemoryContext, rawBytes: Uint8Array, rawOffsets: Int32Array, count: number): Dictionary;
203
215
  /**
204
216
  * Decode dictionary slot `slot` to a string, memoized (ADR-002). First call for a
205
217
  * slot reads its UTF-8 bytes across the boundary (a *miss*); later calls reuse the
@@ -346,6 +358,8 @@ declare function freeColumn(ctx: MemoryContext, col: Column): void;
346
358
  type ArithOp = 'add' | 'sub' | 'mul' | 'div' | 'mod';
347
359
  /** dt accessor field names (dtypes.md §10, ADR-010). */
348
360
  type DtComponent = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond' | 'weekday' | 'dayOfYear' | 'quarter';
361
+ /** str namespace op names (dtypes.md §13). v1 has only 'slice'. */
362
+ type StrOp = 'slice';
349
363
  /** Comparison operators → boolean/mask (dtypes.md §4.1). */
350
364
  type CompareOp = 'gt' | 'ge' | 'lt' | 'le' | 'eq' | 'ne';
351
365
  /** Short-circuit-free three-valued boolean operators (dtypes.md §4.2). */
@@ -404,6 +418,16 @@ type ExprNode = Readonly<{
404
418
  kind: 'dt';
405
419
  component: DtComponent;
406
420
  operand: Expr;
421
+ }>
422
+ /**
423
+ * str.slice: substring via JS String.prototype.slice semantics (dtypes.md §13).
424
+ * Applied to dictionary values once (O(unique)), then indices remapped (O(rows)).
425
+ */
426
+ | Readonly<{
427
+ kind: 'strSlice';
428
+ operand: Expr;
429
+ start: number;
430
+ end: number | undefined;
407
431
  }>;
408
432
  /** Anything accepted where an expression operand is expected. Raw scalars wrap to `lit`. */
409
433
  type ExprLike = Expr | ScalarValue;
@@ -455,6 +479,12 @@ declare class Expr {
455
479
  * Each method returns an `i32` Expr.
456
480
  */
457
481
  get dt(): DtProxy;
482
+ /**
483
+ * str namespace for `utf8` columns (dtypes.md §13).
484
+ * Returns a {@link StrProxy} with `.slice(start, end?)`.
485
+ * Throws a dtype error at compile time if the column is not `utf8`.
486
+ */
487
+ get str(): StrProxy;
458
488
  /** Readable, unambiguous rendering for `console.log` / error messages. */
459
489
  toString(): string;
460
490
  }
@@ -476,6 +506,30 @@ declare class DtProxy {
476
506
  dayOfYear(): Expr;
477
507
  quarter(): Expr;
478
508
  }
509
+ /**
510
+ * str accessor proxy returned by `Expr.str`. Provides string operations over
511
+ * `utf8` columns; dtypes.md §13. A dtype error is raised at compile time (not
512
+ * here) if the parent expression is not `utf8`.
513
+ */
514
+ declare class StrProxy {
515
+ private readonly operand;
516
+ constructor(operand: Expr);
517
+ /**
518
+ * Substring via `JS String.prototype.slice` semantics (dtypes.md §13).
519
+ *
520
+ * - Negative `start`/`end`: count from the end of the string.
521
+ * - `end` omitted: slice to the end of the string.
522
+ * - Out-of-range indices clamp (same as JS).
523
+ * - Null rows propagate null.
524
+ * - UTF-16 code-unit indexing (same as every JS string API).
525
+ * **Surrogate-pair caveat:** a supplementary character (emoji, CJK extension, etc.)
526
+ * occupies two code units; `slice` may split a surrogate pair, producing an
527
+ * unpaired surrogate (well-defined but unusual in JS, not valid UTF-8).
528
+ * If you need grapheme-cluster or codepoint semantics, pre-process with JS before
529
+ * loading into the frame.
530
+ */
531
+ slice(start: number, end?: number): Expr;
532
+ }
479
533
  /** Reference the frame column named `name`. */
480
534
  declare function col(name: string): Expr;
481
535
  /**
@@ -578,6 +632,14 @@ type TExpr = Readonly<{
578
632
  component: DtComponent;
579
633
  dtype: 'i32';
580
634
  operand: TExpr;
635
+ }>
636
+ /** str.slice: substring on dictionary values (result dtype = 'utf8', dtypes.md §13). */
637
+ | Readonly<{
638
+ kind: 'strSlice';
639
+ dtype: 'utf8';
640
+ operand: TExpr;
641
+ start: number;
642
+ end: number | undefined;
581
643
  }>;
582
644
  /** Resolve `expr` against `schema`, returning the typed IR. Throws {@link ExprError}. */
583
645
  declare function resolve(expr: Expr, schema: Schema): TExpr;
@@ -670,6 +732,14 @@ interface HashExports {
670
732
  hash_f32(data: number, vp: number, outHash: number, len: number): void;
671
733
  /** `hash_i64(data, vp, out_hash, len) -> ()` — v2.3 i64 column hash. */
672
734
  hash_i64(data: number, vp: number, outHash: number, len: number): void;
735
+ /**
736
+ * `hash_utf8_dict(offsets_ptr, bytes_ptr, dict_count, out_hash_ptr) -> ()` — ABI §12.
737
+ *
738
+ * For each dictionary slot `k in 0..dict_count`, hashes the raw UTF-8 bytes
739
+ * `bytes[offsets[k]..offsets[k+1])` into `out_hash[k]` (i64). No row validity
740
+ * is involved; row nullness is handled separately by the join validity bitmaps.
741
+ */
742
+ hash_utf8_dict(offsetsPtr: number, bytesPtr: number, dictCount: number, outHashPtr: number): void;
673
743
  /** `hash_combine(acc_hash, add_hash, len) -> ()` — in-place multi-key mix. */
674
744
  hash_combine(accHash: number, addHash: number, len: number): void;
675
745
  /**
@@ -733,6 +803,31 @@ declare class SeriesDtProxy {
733
803
  dayOfYear(): Series;
734
804
  quarter(): Series;
735
805
  }
806
+ /**
807
+ * Series.str accessor proxy. Returned by `series.str`; provides string operations
808
+ * over `utf8` columns (dtypes.md §13). Throws TypeError if the column is not utf8.
809
+ */
810
+ declare class SeriesStrProxy {
811
+ private readonly series;
812
+ constructor(series: Series);
813
+ /**
814
+ * Substring via `JS String.prototype.slice` semantics (dtypes.md §13).
815
+ *
816
+ * - Negative `start`/`end`: count from the end of the string.
817
+ * - `end` omitted: slice to the end of the string.
818
+ * - Out-of-range indices clamp (same as JS).
819
+ * - Null rows propagate null; the op never inspects null-row string values.
820
+ * - UTF-16 code-unit indexing.
821
+ * **Surrogate-pair caveat:** a supplementary character occupies two code units;
822
+ * `slice` may split a surrogate pair (well-defined in JS, unusual in UTF-8).
823
+ *
824
+ * Implementation: applied to dictionary values once (O(unique)), then indices
825
+ * remapped (O(rows)) — no per-row string work.
826
+ *
827
+ * Returns a new `utf8` Series.
828
+ */
829
+ slice(start: number, end?: number): Series;
830
+ }
736
831
  declare class Series {
737
832
  readonly name: string;
738
833
  readonly dtype: DType;
@@ -750,6 +845,12 @@ declare class Series {
750
845
  * Throws TypeError for disallowed fields (e.g. hour on date32).
751
846
  */
752
847
  get dt(): SeriesDtProxy;
848
+ /**
849
+ * str accessor namespace for `utf8` columns (dtypes.md §13).
850
+ * Returns a {@link SeriesStrProxy} with string methods.
851
+ * Throws TypeError if the column is not `utf8`.
852
+ */
853
+ get str(): SeriesStrProxy;
753
854
  [Symbol.iterator](): IterableIterator<Cell>;
754
855
  toString(): string;
755
856
  }
@@ -796,10 +897,12 @@ declare class GroupBy {
796
897
 
797
898
  /**
798
899
  * Hash join (spec §4; ADR-005). Builds on the right, probes left, via `join_hash_inner`/
799
- * `join_hash_left` (ABI §9 D; left emits r_idx=-1 → nulls). utf8 keys are dictionary-unified
800
- * (JS unifyDictionaries) so equal strings across frames share a merged index; bool widens to
801
- * i32; a null in any key excludes the row. Output = all left columns + right non-key columns
802
- * (colliding right names suffixed _right).
900
+ * `join_hash_left` (ABI §9 D; left emits r_idx=-1 → nulls). utf8 keys use the
901
+ * unification-free path (ABI §12): each side's dictionary bytes are hashed once via
902
+ * `hash_utf8_dict`, then row hashes are gathered via `gather_i64`; no JS dict unification
903
+ * is performed. bool widens to i32; a null in any key excludes the row. Output = all left
904
+ * columns + right non-key columns (colliding right names suffixed _right). Output utf8 key
905
+ * column reuses the left dictionary (ABI §12).
803
906
  */
804
907
 
805
908
  type JoinHow = 'inner' | 'left';
@@ -851,6 +954,18 @@ declare class DataFrame implements FrameView, GroupBySource {
851
954
  static fromColumns(cols: Readonly<Record<string, ColumnInput>>, opts?: FrameOptions): DataFrame;
852
955
  static fromRecords(records: ReadonlyArray<Readonly<Record<string, Cell>>>, opts?: FrameOptions): DataFrame;
853
956
  private static fromRoots;
957
+ /**
958
+ * @internal Adopt pre-built wasm Column objects directly into a DataFrame,
959
+ * bypassing the JS-array round-trip of {@link fromColumns}. Used by
960
+ * `fromArrow` for zero-copy column adoption (CP.1 ingest fast path).
961
+ *
962
+ * Every column in `named` must have `owned === true` and correct wasm pointers;
963
+ * ownership transfers to the returned DataFrame (and its OwnedColumn wrappers).
964
+ */
965
+ static _adoptColumns(rt: DfRuntime, named: ReadonlyArray<{
966
+ name: string;
967
+ col: Column;
968
+ }>, length: number): DataFrame;
854
969
  get shape(): readonly [number, number];
855
970
  get columns(): readonly string[];
856
971
  get dtypes(): Readonly<Record<string, DType>>;
@@ -883,4 +998,4 @@ declare class DataFrame implements FrameView, GroupBySource {
883
998
  }
884
999
  declare function scope<T>(fn: (track: <F extends DataFrame>(df: F) => F) => T): T;
885
1000
 
886
- export { createMemoryContext as $, type AggName as A, type BoolOp as B, type Column as C, type DType as D, Expr as E, type FrameView as F, GroupBy as G, type SortOptions as H, type TypedArrayCtor as I, type JoinHow as J, type KernelFn as K, type LoadOptions as L, type MemoryContext as M, type NamedColumn as N, type ViewOf as O, type WasmMemoryModule as P, type WithColumnOptions as Q, type Row as R, type ScalarValue as S, type TExpr as T, aggResult as U, type ViewDType as V, type WasmExports as W, callKernel as X, col as Y, columnToArray as Z, createColumn as _, type Cell as a, createViewOf as a0, decodeDictionary as a1, decodeSlot as a2, decodeStats as a3, defaultRuntime as a4, detectSimd as a5, dtypeInfo as a6, freeColumn as a7, freeDictionary as a8, inferType as a9, init as aa, lit as ab, loadRuntime as ac, loadWasmModule as ad, resolve as ae, runtimeFromExports as af, schemaOf as ag, scope as ah, sliceColumn as ai, toExpr as aj, unifyDictionaries as ak, useRuntime as al, writeDictionary as am, type DfRuntime as b, DataFrame as c, type FrameOptions as d, type AggOp as e, type AggRequest as f, type AggSpec as g, type ArithOp as h, type ColumnBuffer as i, type ColumnInput as j, type ColumnView as k, type CompareOp as l, DTYPES as m, type DTypeInfo as n, type DictUnifyResult as o, type Dictionary as p, type ExprLike as q, type ExprNode as r, type FrameWasm as s, type GroupBySource as t, type JoinOptions as u, type JoinSource as v, type KernelWasm as w, type RowCursor as x, type Schema as y, Series as z };
1001
+ export { callKernel as $, type AggName as A, type BoolOp as B, type Column as C, type DType as D, Expr as E, type FrameView as F, GroupBy as G, Series as H, SeriesStrProxy as I, type JoinHow as J, type KernelFn as K, type LoadOptions as L, type MemoryContext as M, type NamedColumn as N, type SortOptions as O, type StrOp as P, StrProxy as Q, type Row as R, type ScalarValue as S, type TExpr as T, type TypedArrayCtor as U, type ViewDType as V, type ViewOf as W, type WasmExports as X, type WasmMemoryModule as Y, type WithColumnOptions as Z, aggResult as _, type Cell as a, col as a0, columnToArray as a1, createColumn as a2, createMemoryContext as a3, createViewOf as a4, decodeDictionary as a5, decodeSlot as a6, decodeStats as a7, defaultRuntime as a8, detectSimd as a9, dtypeInfo as aa, freeColumn as ab, freeDictionary as ac, inferType as ad, init as ae, lit as af, loadRuntime as ag, loadWasmModule as ah, resolve as ai, runtimeFromExports as aj, schemaOf as ak, scope as al, sliceColumn as am, toExpr as an, unifyDictionaries as ao, useRuntime as ap, writeDictionary as aq, writeDictionaryFromRawBytes as ar, type DfRuntime as b, DataFrame as c, type FrameOptions as d, type AggOp as e, type AggRequest as f, type AggSpec as g, type ArithOp as h, type ColumnBuffer as i, type ColumnInput as j, type ColumnView as k, type CompareOp as l, DTYPES as m, type DTypeInfo as n, type DictUnifyResult as o, type Dictionary as p, DtProxy as q, type ExprLike as r, type ExprNode as s, type FrameWasm as t, type GroupBySource as u, type JoinOptions as v, type JoinSource as w, type KernelWasm as x, type RowCursor as y, type Schema as z };
@@ -200,6 +200,18 @@ interface Dictionary {
200
200
  * would detach it, ADR-001).
201
201
  */
202
202
  declare function writeDictionary(ctx: MemoryContext, uniques: readonly string[]): Dictionary;
203
+ /**
204
+ * Write a dictionary directly from raw UTF-8 bytes and Arrow-style offsets —
205
+ * no JS string decode or encode (ABI §12 ingest note, ADR-002).
206
+ *
207
+ * `rawOffsets[k]..rawOffsets[k+1]` is the byte range of string `k` in
208
+ * `rawBytes`; both arrays are already in our dictionaries' layout. This is a
209
+ * pure bulk-copy: O(count + bytesLen), zero TextDecoder/TextEncoder calls.
210
+ *
211
+ * Allocates both wasm buffers before taking any view so a grow between the two
212
+ * allocs cannot detach a live TypedArray (ADR-001).
213
+ */
214
+ declare function writeDictionaryFromRawBytes(ctx: MemoryContext, rawBytes: Uint8Array, rawOffsets: Int32Array, count: number): Dictionary;
203
215
  /**
204
216
  * Decode dictionary slot `slot` to a string, memoized (ADR-002). First call for a
205
217
  * slot reads its UTF-8 bytes across the boundary (a *miss*); later calls reuse the
@@ -346,6 +358,8 @@ declare function freeColumn(ctx: MemoryContext, col: Column): void;
346
358
  type ArithOp = 'add' | 'sub' | 'mul' | 'div' | 'mod';
347
359
  /** dt accessor field names (dtypes.md §10, ADR-010). */
348
360
  type DtComponent = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond' | 'weekday' | 'dayOfYear' | 'quarter';
361
+ /** str namespace op names (dtypes.md §13). v1 has only 'slice'. */
362
+ type StrOp = 'slice';
349
363
  /** Comparison operators → boolean/mask (dtypes.md §4.1). */
350
364
  type CompareOp = 'gt' | 'ge' | 'lt' | 'le' | 'eq' | 'ne';
351
365
  /** Short-circuit-free three-valued boolean operators (dtypes.md §4.2). */
@@ -404,6 +418,16 @@ type ExprNode = Readonly<{
404
418
  kind: 'dt';
405
419
  component: DtComponent;
406
420
  operand: Expr;
421
+ }>
422
+ /**
423
+ * str.slice: substring via JS String.prototype.slice semantics (dtypes.md §13).
424
+ * Applied to dictionary values once (O(unique)), then indices remapped (O(rows)).
425
+ */
426
+ | Readonly<{
427
+ kind: 'strSlice';
428
+ operand: Expr;
429
+ start: number;
430
+ end: number | undefined;
407
431
  }>;
408
432
  /** Anything accepted where an expression operand is expected. Raw scalars wrap to `lit`. */
409
433
  type ExprLike = Expr | ScalarValue;
@@ -455,6 +479,12 @@ declare class Expr {
455
479
  * Each method returns an `i32` Expr.
456
480
  */
457
481
  get dt(): DtProxy;
482
+ /**
483
+ * str namespace for `utf8` columns (dtypes.md §13).
484
+ * Returns a {@link StrProxy} with `.slice(start, end?)`.
485
+ * Throws a dtype error at compile time if the column is not `utf8`.
486
+ */
487
+ get str(): StrProxy;
458
488
  /** Readable, unambiguous rendering for `console.log` / error messages. */
459
489
  toString(): string;
460
490
  }
@@ -476,6 +506,30 @@ declare class DtProxy {
476
506
  dayOfYear(): Expr;
477
507
  quarter(): Expr;
478
508
  }
509
+ /**
510
+ * str accessor proxy returned by `Expr.str`. Provides string operations over
511
+ * `utf8` columns; dtypes.md §13. A dtype error is raised at compile time (not
512
+ * here) if the parent expression is not `utf8`.
513
+ */
514
+ declare class StrProxy {
515
+ private readonly operand;
516
+ constructor(operand: Expr);
517
+ /**
518
+ * Substring via `JS String.prototype.slice` semantics (dtypes.md §13).
519
+ *
520
+ * - Negative `start`/`end`: count from the end of the string.
521
+ * - `end` omitted: slice to the end of the string.
522
+ * - Out-of-range indices clamp (same as JS).
523
+ * - Null rows propagate null.
524
+ * - UTF-16 code-unit indexing (same as every JS string API).
525
+ * **Surrogate-pair caveat:** a supplementary character (emoji, CJK extension, etc.)
526
+ * occupies two code units; `slice` may split a surrogate pair, producing an
527
+ * unpaired surrogate (well-defined but unusual in JS, not valid UTF-8).
528
+ * If you need grapheme-cluster or codepoint semantics, pre-process with JS before
529
+ * loading into the frame.
530
+ */
531
+ slice(start: number, end?: number): Expr;
532
+ }
479
533
  /** Reference the frame column named `name`. */
480
534
  declare function col(name: string): Expr;
481
535
  /**
@@ -578,6 +632,14 @@ type TExpr = Readonly<{
578
632
  component: DtComponent;
579
633
  dtype: 'i32';
580
634
  operand: TExpr;
635
+ }>
636
+ /** str.slice: substring on dictionary values (result dtype = 'utf8', dtypes.md §13). */
637
+ | Readonly<{
638
+ kind: 'strSlice';
639
+ dtype: 'utf8';
640
+ operand: TExpr;
641
+ start: number;
642
+ end: number | undefined;
581
643
  }>;
582
644
  /** Resolve `expr` against `schema`, returning the typed IR. Throws {@link ExprError}. */
583
645
  declare function resolve(expr: Expr, schema: Schema): TExpr;
@@ -670,6 +732,14 @@ interface HashExports {
670
732
  hash_f32(data: number, vp: number, outHash: number, len: number): void;
671
733
  /** `hash_i64(data, vp, out_hash, len) -> ()` — v2.3 i64 column hash. */
672
734
  hash_i64(data: number, vp: number, outHash: number, len: number): void;
735
+ /**
736
+ * `hash_utf8_dict(offsets_ptr, bytes_ptr, dict_count, out_hash_ptr) -> ()` — ABI §12.
737
+ *
738
+ * For each dictionary slot `k in 0..dict_count`, hashes the raw UTF-8 bytes
739
+ * `bytes[offsets[k]..offsets[k+1])` into `out_hash[k]` (i64). No row validity
740
+ * is involved; row nullness is handled separately by the join validity bitmaps.
741
+ */
742
+ hash_utf8_dict(offsetsPtr: number, bytesPtr: number, dictCount: number, outHashPtr: number): void;
673
743
  /** `hash_combine(acc_hash, add_hash, len) -> ()` — in-place multi-key mix. */
674
744
  hash_combine(accHash: number, addHash: number, len: number): void;
675
745
  /**
@@ -733,6 +803,31 @@ declare class SeriesDtProxy {
733
803
  dayOfYear(): Series;
734
804
  quarter(): Series;
735
805
  }
806
+ /**
807
+ * Series.str accessor proxy. Returned by `series.str`; provides string operations
808
+ * over `utf8` columns (dtypes.md §13). Throws TypeError if the column is not utf8.
809
+ */
810
+ declare class SeriesStrProxy {
811
+ private readonly series;
812
+ constructor(series: Series);
813
+ /**
814
+ * Substring via `JS String.prototype.slice` semantics (dtypes.md §13).
815
+ *
816
+ * - Negative `start`/`end`: count from the end of the string.
817
+ * - `end` omitted: slice to the end of the string.
818
+ * - Out-of-range indices clamp (same as JS).
819
+ * - Null rows propagate null; the op never inspects null-row string values.
820
+ * - UTF-16 code-unit indexing.
821
+ * **Surrogate-pair caveat:** a supplementary character occupies two code units;
822
+ * `slice` may split a surrogate pair (well-defined in JS, unusual in UTF-8).
823
+ *
824
+ * Implementation: applied to dictionary values once (O(unique)), then indices
825
+ * remapped (O(rows)) — no per-row string work.
826
+ *
827
+ * Returns a new `utf8` Series.
828
+ */
829
+ slice(start: number, end?: number): Series;
830
+ }
736
831
  declare class Series {
737
832
  readonly name: string;
738
833
  readonly dtype: DType;
@@ -750,6 +845,12 @@ declare class Series {
750
845
  * Throws TypeError for disallowed fields (e.g. hour on date32).
751
846
  */
752
847
  get dt(): SeriesDtProxy;
848
+ /**
849
+ * str accessor namespace for `utf8` columns (dtypes.md §13).
850
+ * Returns a {@link SeriesStrProxy} with string methods.
851
+ * Throws TypeError if the column is not `utf8`.
852
+ */
853
+ get str(): SeriesStrProxy;
753
854
  [Symbol.iterator](): IterableIterator<Cell>;
754
855
  toString(): string;
755
856
  }
@@ -796,10 +897,12 @@ declare class GroupBy {
796
897
 
797
898
  /**
798
899
  * Hash join (spec §4; ADR-005). Builds on the right, probes left, via `join_hash_inner`/
799
- * `join_hash_left` (ABI §9 D; left emits r_idx=-1 → nulls). utf8 keys are dictionary-unified
800
- * (JS unifyDictionaries) so equal strings across frames share a merged index; bool widens to
801
- * i32; a null in any key excludes the row. Output = all left columns + right non-key columns
802
- * (colliding right names suffixed _right).
900
+ * `join_hash_left` (ABI §9 D; left emits r_idx=-1 → nulls). utf8 keys use the
901
+ * unification-free path (ABI §12): each side's dictionary bytes are hashed once via
902
+ * `hash_utf8_dict`, then row hashes are gathered via `gather_i64`; no JS dict unification
903
+ * is performed. bool widens to i32; a null in any key excludes the row. Output = all left
904
+ * columns + right non-key columns (colliding right names suffixed _right). Output utf8 key
905
+ * column reuses the left dictionary (ABI §12).
803
906
  */
804
907
 
805
908
  type JoinHow = 'inner' | 'left';
@@ -851,6 +954,18 @@ declare class DataFrame implements FrameView, GroupBySource {
851
954
  static fromColumns(cols: Readonly<Record<string, ColumnInput>>, opts?: FrameOptions): DataFrame;
852
955
  static fromRecords(records: ReadonlyArray<Readonly<Record<string, Cell>>>, opts?: FrameOptions): DataFrame;
853
956
  private static fromRoots;
957
+ /**
958
+ * @internal Adopt pre-built wasm Column objects directly into a DataFrame,
959
+ * bypassing the JS-array round-trip of {@link fromColumns}. Used by
960
+ * `fromArrow` for zero-copy column adoption (CP.1 ingest fast path).
961
+ *
962
+ * Every column in `named` must have `owned === true` and correct wasm pointers;
963
+ * ownership transfers to the returned DataFrame (and its OwnedColumn wrappers).
964
+ */
965
+ static _adoptColumns(rt: DfRuntime, named: ReadonlyArray<{
966
+ name: string;
967
+ col: Column;
968
+ }>, length: number): DataFrame;
854
969
  get shape(): readonly [number, number];
855
970
  get columns(): readonly string[];
856
971
  get dtypes(): Readonly<Record<string, DType>>;
@@ -883,4 +998,4 @@ declare class DataFrame implements FrameView, GroupBySource {
883
998
  }
884
999
  declare function scope<T>(fn: (track: <F extends DataFrame>(df: F) => F) => T): T;
885
1000
 
886
- export { createMemoryContext as $, type AggName as A, type BoolOp as B, type Column as C, type DType as D, Expr as E, type FrameView as F, GroupBy as G, type SortOptions as H, type TypedArrayCtor as I, type JoinHow as J, type KernelFn as K, type LoadOptions as L, type MemoryContext as M, type NamedColumn as N, type ViewOf as O, type WasmMemoryModule as P, type WithColumnOptions as Q, type Row as R, type ScalarValue as S, type TExpr as T, aggResult as U, type ViewDType as V, type WasmExports as W, callKernel as X, col as Y, columnToArray as Z, createColumn as _, type Cell as a, createViewOf as a0, decodeDictionary as a1, decodeSlot as a2, decodeStats as a3, defaultRuntime as a4, detectSimd as a5, dtypeInfo as a6, freeColumn as a7, freeDictionary as a8, inferType as a9, init as aa, lit as ab, loadRuntime as ac, loadWasmModule as ad, resolve as ae, runtimeFromExports as af, schemaOf as ag, scope as ah, sliceColumn as ai, toExpr as aj, unifyDictionaries as ak, useRuntime as al, writeDictionary as am, type DfRuntime as b, DataFrame as c, type FrameOptions as d, type AggOp as e, type AggRequest as f, type AggSpec as g, type ArithOp as h, type ColumnBuffer as i, type ColumnInput as j, type ColumnView as k, type CompareOp as l, DTYPES as m, type DTypeInfo as n, type DictUnifyResult as o, type Dictionary as p, type ExprLike as q, type ExprNode as r, type FrameWasm as s, type GroupBySource as t, type JoinOptions as u, type JoinSource as v, type KernelWasm as w, type RowCursor as x, type Schema as y, Series as z };
1001
+ export { callKernel as $, type AggName as A, type BoolOp as B, type Column as C, type DType as D, Expr as E, type FrameView as F, GroupBy as G, Series as H, SeriesStrProxy as I, type JoinHow as J, type KernelFn as K, type LoadOptions as L, type MemoryContext as M, type NamedColumn as N, type SortOptions as O, type StrOp as P, StrProxy as Q, type Row as R, type ScalarValue as S, type TExpr as T, type TypedArrayCtor as U, type ViewDType as V, type ViewOf as W, type WasmExports as X, type WasmMemoryModule as Y, type WithColumnOptions as Z, aggResult as _, type Cell as a, col as a0, columnToArray as a1, createColumn as a2, createMemoryContext as a3, createViewOf as a4, decodeDictionary as a5, decodeSlot as a6, decodeStats as a7, defaultRuntime as a8, detectSimd as a9, dtypeInfo as aa, freeColumn as ab, freeDictionary as ac, inferType as ad, init as ae, lit as af, loadRuntime as ag, loadWasmModule as ah, resolve as ai, runtimeFromExports as aj, schemaOf as ak, scope as al, sliceColumn as am, toExpr as an, unifyDictionaries as ao, useRuntime as ap, writeDictionary as aq, writeDictionaryFromRawBytes as ar, type DfRuntime as b, DataFrame as c, type FrameOptions as d, type AggOp as e, type AggRequest as f, type AggSpec as g, type ArithOp as h, type ColumnBuffer as i, type ColumnInput as j, type ColumnView as k, type CompareOp as l, DTYPES as m, type DTypeInfo as n, type DictUnifyResult as o, type Dictionary as p, DtProxy as q, type ExprLike as r, type ExprNode as s, type FrameWasm as t, type GroupBySource as u, type JoinOptions as v, type JoinSource as w, type KernelWasm as x, type RowCursor as y, type Schema as z };