Skip to content

Fix native batch async fallbacks - #55

Merged
platypii merged 2 commits into
masterfrom
fix/native-batch-async-fallbacks
Aug 18, 2026
Merged

Fix native batch async fallbacks#55
platypii merged 2 commits into
masterfrom
fix/native-batch-async-fallbacks

Conversation

@platypii

Copy link
Copy Markdown
Contributor

Summary

  • recognize promises and cross-realm thenables through one shared helper while preserving the synchronous column fast path
  • resolve row cells concurrently within each bounded row-to-batch buffer
  • share row-scope detection and keep unambiguous qualified aggregate inputs on the native batch path
  • cover bounded concurrent materialization, foreign-realm promises, and qualified aggregates with regression tests

Benchmarks

Compared this branch with origin/master on Node v26.5.1. Each engine received one warm-up, followed by five alternating measured runs with explicit garbage collection. The table reports medians; every operation also checked its output for correctness.

Scenario origin/master This branch Speedup
Deferred row cells: 128 rows × 4 columns, 1 ms cell latency, 64-row batches 599.37 ms 2.99 ms 200.43×
SELECT SUM(d.id) over 500,000 typed numeric values 198.98 ms 23.44 ms 8.49×

The deferred-cell case measures the bounded concurrency introduced by the row adapter; the aggregate case measures avoiding the row fallback for an unambiguous qualified identifier.

Validation

  • npm test — 65 files, 1,982 tests passed
  • npm run lint
  • npx tsc

@platypii
platypii merged commit 11a0aa9 into master Aug 18, 2026
6 checks passed
@platypii
platypii deleted the fix/native-batch-async-fallbacks branch August 18, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant