Commit 1e260f8
feat(cache): result-cache worker support + example fixtures
Port the upstream table-function result cache (vgi 02a52ad, vgi-python 33740fe)
plus two smaller syncs. Full launcher suite: 237 pass / 23 skip / 0 fail
(was 194 / 28 / 38), verified inline and under VGI_RPC_SHM_SIZE_BYTES.
The C++ extension caches a complete cacheable scan and replays it, gated on a
worker advertising vgi.cache.* on its FIRST emitted batch.
- vgi/cache/CacheControl (new package): the vgi.cache.* vocabulary (ttl/expires/
scope/no_store/etag/last_modified/revalidatable/stale_*/not_modified) plus the
request-side IF_NONE_MATCH_KEY / IF_MODIFIED_SINCE_KEY. Builder -> toMetadata().
No OutputCollector change was needed: emit(root, customMetadata) already
existed, so CacheControl is purely a metadata renderer, and conditional
revalidation reads the validator off the tick's AnnotatedBatch.customMetadata().
- 19 fixtures: CacheFunctions (13 simple), CacheParallelFunctions (cache_parallel/
cache_ordered/cache_interleaved, per-execution queue fan-out), CacheTypesFunction
(STRUCT/LIST/DECIMAL/TIMESTAMP + NULLs through the spill blob),
CacheFilteredFunction, CachePartitionedFunction. 14 cache data tables, plus
cache_versioned (columns-based AT -> cache_versioned_scan(version) in both
catalog_table_scan_function_get and _scan_branches_get).
- Worker.registerUnlistedTable(fn): cache_multicol backs a data table but is NOT a
callable table function. vgi-python's Table(function=F) does not imply F is in
the catalog's functions list, but registerTables both dispatches and advertises.
Without this the table-fn count is 122, not the asserted 121.
table/positional_args.test needed no framework fix — CatalogTable already threads
scanFunctionPositional into the scan RPC, so the vgi-python bug 43974b5 fixes
never existed here. The failure was a fixture mismatch: example.data.large_sequence
passed sequence(1_000_001); upstream pins 1,000,000 rows / max 999,999.
VGI_TEST_BRANCH_DIR (vgi-python 395b71d): the native-branch and rff_* fixtures
hardcoded /tmp/..., but upstream now gates those 6 tests behind
require-env VGI_TEST_BRANCH_DIR and has the worker read the same env — so they
were silently SKIPPING. Main.BRANCH_DIR reads it (default java.io.tmpdir) and
ci/run-integration.sh exports it. Worker and test must name the same directory;
the paths are compared byte-for-byte. Five of the six now run; multi_branch_iceberg
still needs VGI_TEST_ICEBERG.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ac74d0e commit 1e260f8
13 files changed
Lines changed: 1997 additions & 12 deletions
File tree
- ci
- vgi-example-worker/src/main/java/farm/query/vgi/example
- table
- vgi/src/main/java/farm/query/vgi
- cache
- internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
290 | 369 | | |
291 | 370 | | |
292 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
0 commit comments