Skip to content

Releases: Query-farm/vgi-typescript

v0.25.4 — @noble/ciphers 2.3.0, TypeScript 7 build

Choose a tag to compare

@rustyconover rustyconover released this 12 Aug 22:13

A dependency refresh, and the integration suite now runs a test it had been skipping.

  • Runtime dep @noble/ciphers 2.2.0 → 2.3.0.
  • Dev/test deps: TypeScript 6.0.3 → 7.0.2 (type-checks the build cleanly), @duckdb/node-api 1.5.2-r.1 → 1.5.5-r.4, @query-farm/vgi-rpc 0.19.2 → 0.19.4. The peer range >=0.19.2 <0.20.0 is unchanged and still covers it.
  • CI runs attach/attach_options_required.test, which had been gated off as needing a fixture this repo lacked. Both example workers have served the attach_options_required catalog for some time; the skip entry outlived the gap and was hiding real coverage.

v0.25.3 — require the vgi-rpc that runs on Cloudflare

Choose a tag to compare

@rustyconover rustyconover released this 11 Aug 21:57

Fixed

Every table-in-out and blended row-transform function failed on Cloudflare Workers.

@query-farm/vgi-rpc 0.19.1 read process.env.VGI_DISPATCH_DEBUG bare in the HTTP exchange dispatcher. workerd has no process binding, so that threw ReferenceError: process is not defined mid-dispatch. Only the exchange routes reach that dispatcher, so plain table functions kept working and the failure appeared on the first LATERAL / table-in-out call against a deployed worker.

The fix is in vgi-rpc 0.19.2. The change here is the peer floor, >=0.19.2 <0.20.0, and it is load-bearing rather than cosmetic: a tree that already had 0.19.1 installed still satisfies the old >=0.19.1 range, so a plain install leaves the broken version in place and the Workers bundle keeps shipping it.

No API changes. Workers users should reinstall — a clean install if an older 0.19.x is already present — and redeploy.

v0.25.2 — reach blended row-transforms from the workerd facade

Choose a tag to compare

@rustyconover rustyconover released this 11 Aug 21:38

Added

vgi/worker-cf re-exports a curated subset of index.core, and defineRowTransformFunction was not in it — nor were parentRowsMetadata (the per-output-row provenance a 1→N blended function must emit) or constraintSpecFields.

A Cloudflare worker therefore could not define a blended table-in-out at all. The package root reaches them, but it also re-exports the Node-only stdio Worker, which breaks the workerd bundle — so the facade was the only route, and it was closed.

Now exported from vgi/worker-cf:

  • defineRowTransformFunction
  • parentRowsMetadata, PARENT_ROW_METADATA_KEY
  • constraintSpecFields — the blended config has no argConstraints of its own, so a worker wanting ge/le/choices/pattern on a row-transform's arguments applies them itself
  • types: RowTransformConfig, RowTransformProcessParams, TableInOutBindParams, ArgumentSpec, ArgumentConstraints

Facade-only change — no behaviour moves, and nothing else is affected.

v0.25.1 — require the vgi-rpc that Cloudflare can't double-encode

Choose a tag to compare

@rustyconover rustyconover released this 11 Aug 21:11

Fixed

Workers deployments built on vgi/worker-cf returned undecodable responses.

@query-farm/vgi-rpc 0.19.0 compressed a response and stamped a standard Content-Encoding; the Cloudflare edge then gzipped it again without amending the header. Clients decoded once, found compressed bytes where Arrow IPC should be, and failed the request.

The fix itself is entirely in vgi-rpc 0.19.1, which on workerd labels the codec with X-VGI-Content-Encoding — an encoding the edge leaves alone and clients already prefer. Compression is retained, not disabled.

The change in this release is the peer range: the floor moves to >=0.19.1 <0.20.0 so a Workers consumer cannot resolve the broken 0.19.0 through us.

No API changes. Upgrading requires no code changes, but Workers users should reinstall so the new peer floor takes effect, then redeploy.

v0.24.0 — VGI protocol 1.3.0 and global functions

Choose a tag to compare

@rustyconover rustyconover released this 05 Aug 13:41

The community extension already serves protocol 1.3.0 (vgi commit e76ba86), so a worker emitting the old 15-field catalog_attach result fails ATTACH against what users install today. Upgrading is required, not optional.

Protocol 1.3.0

The catalog_attach handler built a 15-key value against the 17-field generated schema, so the worker emitted 15 columns and the extension rejected it. That wasn't a type error — wrapResult is loosely typed — so it surfaced only at runtime, and it broke 248 of 298 launcher cases.

The regenerated schema landed in 86486c6 without updating any producer. global_functions and global_function_prefix are now emitted from all three producer sites.

Global-function probes

examples/global_functions.ts adds global_scalar, global_table, global_agg and global_buffered — one per function kind, mirroring vgi-python's _test_fixtures/global_functions.py, so the cross-language example catalog matches again. Closes the three duckdb_functions() inventory tests (scalar 51→52, aggregate 17→18, table 144→146).

Advertisement

CatalogDescriptor gains globalFunctions and globalFunctionPrefix. read-only.ts grows _globalFunctionInfos(), which resolves each entry's owning schema and throws if an entry isn't declared in any schema — mirroring vgi-python's __post_init__ validation.

Wire payload verified by decode: prefix vgi_example, 4 entries, kinds SCALAR/TABLE/AGGREGATE/TABLE_BUFFERING, all schema_name=main, names unprefixed.

The C++ consuming side is not written yet — the columns are transmitted and ignored.

Dependencies

@query-farm/vgi-rpc floor moves ^0.15.4^0.17.0.

Results

Integration: launcher 294/4 → 298/0, http 289/3 → 292/0. bun test holds at 235 pass / 67 skip; tsc adds no errors beyond the two pre-existing test-only ones.

v0.21.0

Choose a tag to compare

@rustyconover rustyconover released this 22 Jul 03:33

Adds missing API, fixes a second Arrow backend, and makes the test suite actually run

partitionScope

The cache-control key for per-PARTITION caching — exposed by the Go, Java and Python SDKs but missing here entirely. A TypeScript user could not opt a table function into per-partition caching at all.

The flechette backend: 67 integration failures → 0

Nine distinct defects, several of which were the first thing any worker does:

  • Column#isValid didn't exist — and once added, returned false for every row of an all-valid column, silently turning aggregates into NULL.
  • Table#slice didn't exist; batch.slice(0,0) is how an exchange stream closes.
  • serializeBatch never put batch metadata on the wire, despite a unit test that asserted only the in-memory property.
  • Parameterized types shipped with their parameters zeroed — DOUBLE[2] encoded as DOUBLE[0].
  • String(type) was used as type identity; flechette's plain-object types all stringify to [object Object], so type_info(42::BIGINT) resolved to the INTEGER overload.

The backend had been published and benchmarked while structurally unable to serve a request.

Duplicate-copy hardening

The facade patched prototypes by module identity, so batches decoded by @query-farm/vgi-rpc against a second copy of flechette in the tree never received them — surfacing as X is not a function deep in user code, on the exchange path only, pointing nowhere near its cause. adoptArrowJsShape now patches whatever prototypes it is handed.

Dependencies

@query-farm/vgi-rpc 0.15.1 and @query-farm/flechette 2.4.1, which fix a dictionary-batch bug that made every HTTP exchange init unreadable.

Integration runner

Ported from the vgi-go / vgi-python siblings. The previous setup executed 25 of 286 tests and reported green: require httpfs could not resolve against the community extension repo, and the runner counted a skip as a pass — so passed: 280 was indistinguishable from skipped: 280.

It now executes 252, accounts for every skip against an allowlist, and asserts a floor, so a whole-suite skip can never read as green again.

Both Arrow backends: 252/252.

v0.20.0

Choose a tag to compare

@rustyconover rustyconover released this 21 Jul 18:32

Requires @query-farm/vgi-rpc ^0.15.0 (both the peer and dev pin move in lockstep).

Behavioural change — HTTP responses are compressed by default. vgi-rpc 0.15.0 flips compressionLevel from opt-in to a default of zstd level 1, so workers built on serveVgiWorker, createVgiFetch and vgi/worker-cf now compress responses that previously went out uncompressed. Pass compressionLevel: null to restore the old wire.

Also inherited from vgi-rpc 0.15.0:

  • Client-authoritative HTTP codec negotiation.
  • identity promoted to a first-class accept token.
  • A present-but-empty VGI-Supported-Encodings advertisement derived from the runtime — zstd drops out on workerd and Node < 22.15, where fzstd can decode but not encode — with CORS exposure of the header.

Verified against the C++ extension over the full HTTP sqllogictest suite on both Arrow backends (arrow-js and flechette).

v0.19.0

Choose a tag to compare

@rustyconover rustyconover released this 17 Jul 01:23

Port of the vgi-python 0.16 delta + the browser SAB worker. Aligns the TypeScript SDK with vgi-python 0.16.0 and the vgi C++ extension.

  • Blended ("UNNEST-style") table-in-out: defineRowTransformFunction, arity/varargs overload resolution, fixtures (geo_encode, row_sum, blended_drop, projectable_blended, hostile_provenance).
  • Per-output-row provenance for batched correlated LATERAL: parentRowsMetadata() + blended_explode.
  • substream_id + parallel-finalize; distributed sum migrated to buffered.
  • Result-cache surfaces: cache-control on buffered finalize emits, scalar cacheControl (CACHE_CONTROL), conditional-revalidation validators + revalidating fixtures — green on BOTH transports (launcher + HTTP).
  • Browser worker: SAB transport: TypeScript worker over the SharedArrayBuffer transport with true parallelism (one dedicated sub-Worker per slot).
  • deps: @query-farm/vgi-rpc ^0.14.0 (ByteSink export; upstream fix for 0-row exchange emit-metadata).
  • Fixes a pre-existing typecheck break (FunctionInfo.input_from_args missing in read-only.ts).

v0.18.0

Choose a tag to compare

@rustyconover rustyconover released this 12 Jul 18:15

Breaking wire change: TableInfo.required_field_filter_paths (list, AND-only) renamed to required_filters (list<list>, conjunctive normal form — an AND of OR-groups). A group is satisfied when any one of its member dotted-path columns has a WHERE filter; every group must be satisfied. No backward compatibility. Matches vgi-python 0.15.0 and the vgi C++ extension.

v0.14.0

Choose a tag to compare

@rustyconover rustyconover released this 08 Jul 15:35

Surface catalog macros (scalar + table) in describe.json; depend on @query-farm/vgi-rpc 0.11.0 (refreshed landing.html).