feat(zql): add Cap operator for EXISTS pipelines #5661
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| Branch | mlaw/cap-2 |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | File Size | Benchmark Result kilobytes (KB) (Result Δ%) | Upper Boundary kilobytes (KB) (Limit %) |
|---|---|---|---|
| zero-package.tgz | 📈 view plot 🚷 view threshold | 1,933.89 KB(+0.51%)Baseline: 1,924.12 KB | 1,962.61 KB (98.54%) |
| zero.js | 📈 view plot 🚷 view threshold | 282.60 KB(+1.43%)Baseline: 278.62 KB | 284.20 KB (99.44%) |
| zero.js.br | 📈 view plot 🚷 view threshold | 74.56 KB(+0.80%)Baseline: 73.97 KB | 75.45 KB (98.82%) |
|
| Branch | mlaw/cap-2 |
| Testbed | self-hosted |
🚨 2 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Lower Boundary (Limit %) |
|---|---|---|---|---|
| src/client/custom.bench.ts > big schema | Throughput operations / second (ops/s) x 1e3 | 📈 plot 🚷 threshold 🚨 alert (🔔) | 109.56 ops/s x 1e3(-15.30%)Baseline: 129.35 ops/s x 1e3 | 114.54 ops/s x 1e3 (104.54%) |
| src/client/zero.bench.ts > pk compare > pk = N | Throughput operations / second (ops/s) x 1e3 | 📈 plot 🚷 threshold 🚨 alert (🔔) | 49.82 ops/s x 1e3(-14.39%)Baseline: 58.19 ops/s x 1e3 | 54.57 ops/s x 1e3 (109.54%) |
Click to view all benchmark results
| Benchmark | Throughput | Benchmark Result operations / second (ops/s) x 1e3 (Result Δ%) | Lower Boundary operations / second (ops/s) x 1e3 (Limit %) |
|---|---|---|---|
| src/client/custom.bench.ts > big schema | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 109.56 ops/s x 1e3(-15.30%)Baseline: 129.35 ops/s x 1e3 | 114.54 ops/s x 1e3 (104.54%) |
| src/client/zero.bench.ts > basics > All 1000 rows x 10 columns (numbers) | 📈 view plot 🚷 view threshold | 1.93 ops/s x 1e3(-7.52%)Baseline: 2.09 ops/s x 1e3 | 1.16 ops/s x 1e3 (60.28%) |
| src/client/zero.bench.ts > pk compare > pk = N | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 49.82 ops/s x 1e3(-14.39%)Baseline: 58.19 ops/s x 1e3 | 54.57 ops/s x 1e3 (109.54%) |
| src/client/zero.bench.ts > with filter > Lower rows 500 x 10 columns (numbers) | 📈 view plot 🚷 view threshold | 2.94 ops/s x 1e3(-11.37%)Baseline: 3.32 ops/s x 1e3 | 2.42 ops/s x 1e3 (82.24%) |
|
| Branch | mlaw/cap-2 |
| Testbed | self-hosted |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🚨 27 Alerts
🐰 View full continuous benchmarking report in Bencher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces the
Capoperator, an alternative toTakefor EXISTS subquery pipelines.This eliminates SQLite's need to create temporary B-trees for ORDER BY in EXISTS child pipelines, where only row existence matters — not order.
Key changes:
Capoperator (cap.ts): Count-based limiter that tracks membership by primary key set rather than sorted bounds. No comparator, nostart/reversefetch support needed.Source.connect()now acceptssort: undefined.MemorySourcefalls back to primary key ordering internally while exposingschema.sort = undefinedto downstream operators.generateWithOverlayUnorderedvariants in bothmemory-source.ts,table-source.ts, andjoin-utils.tsthat inject/suppress rows by PK match without requiring sorted iteration.builder.ts): EXISTS child pipelines now passisExistsChildflag, connecting sources without ordering and usingCapinstead ofTake.SourceSchema.sortis now optional (Ordering | undefined), reflecting that not all pipelines are ordered.Take,Skip, andUnionFanInnow assert that their input is sorted, catching misuse early.query-builder.ts):buildSelectQueryomitsORDER BYwhen no ordering is specified.Tests:
cap.push.test.tsjoin-utils.test.ts)cap.pg.test.ts) testing various overlay configurations