Skip to content

Bump criterion from 0.5.1 to 0.8.2#7

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/cargo/criterion-0.8.2
Open

Bump criterion from 0.5.1 to 0.8.2#7
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/cargo/criterion-0.8.2

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Feb 23, 2026

Bumps criterion from 0.5.1 to 0.8.2.

Release notes

Sourced from criterion's releases.

criterion-plot-v0.8.2

Other

  • Update Readme

criterion-v0.8.2

Fixed

  • don't build alloca on unsupported targets

Other

  • (deps) bump crate-ci/typos from 1.40.0 to 1.43.0
  • Fix panic with uniform iteration durations in benchmarks
  • Update Readme
  • Exclude development scripts from published package

criterion-plot-v0.8.1

Fixed

  • Typo

criterion-v0.8.1

Fixed

  • Homepage link

Other

  • (deps) bump crate-ci/typos from 1.23.5 to 1.40.0
  • (deps) bump jontze/action-mdbook from 3 to 4
  • (deps) bump actions/checkout from 4 to 6

criterion-plot-v0.8.0

No release notes provided.

criterion-v0.8.0

BREAKING

  • Drop async-std support

Changed

  • Bump MSRV to 1.86, stable to 1.91.1

Added

  • Add ability to plot throughput on summary page.
  • Add support for reporting throughput in elements and bytes - Throughput::ElementsAndBytes allows the text summary to report throughput in both units simultaneously.
  • Add alloca-based memory layout randomisation to mitigate memory effects on measurements.

... (truncated)

Changelog

Sourced from criterion's changelog.

0.8.2 - 2026-02-04

Fixed

  • don't build alloca on unsupported targets

Other

  • (deps) bump crate-ci/typos from 1.40.0 to 1.43.0
  • Fix panic with uniform iteration durations in benchmarks
  • Update Readme
  • Exclude development scripts from published package

0.8.1 - 2025-12-07

Fixed

  • Homepage link

Other

  • (deps) bump crate-ci/typos from 1.23.5 to 1.40.0
  • (deps) bump jontze/action-mdbook from 3 to 4
  • (deps) bump actions/checkout from 4 to 6

0.8.0 - 2025-11-29

BREAKING

  • Drop async-std support

Changed

  • Bump MSRV to 1.86, stable to 1.91.1

Added

  • Add ability to plot throughput on summary page.
  • Add support for reporting throughput in elements and bytes - Throughput::ElementsAndBytes allows the text summary to report throughput in both units simultaneously.
  • Add alloca-based memory layout randomisation to mitigate memory effects on measurements.
  • Add doc comment to benchmark runner in criterion_group macro (removes linter warnings)

Fixed

  • Fix plotting NaN bug

Other

  • Remove Master API Docs links temporarily while we restore the docs publishing.

... (truncated)

Commits
  • 7f0d745 chore: release v0.8.2
  • 4a467ce chore(deps): bump crate-ci/typos from 1.40.0 to 1.43.0
  • b277a75 Fix panic with uniform iteration durations in benchmarks
  • 828af14 fix: don't build alloca on unsupported targets
  • b01316b Update Readme
  • 4c02a3b Exclude development scripts from published package
  • e4e06df chore: release v0.8.1
  • aa548b9 fix: Homepage link
  • 950c3b7 fix: Typo
  • 7e3e50c chore(deps): bump crate-ci/typos from 1.23.5 to 1.40.0
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Feb 23, 2026

Labels

The following labels could not be found: dependencies, rust. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot dependabot bot force-pushed the dependabot/cargo/criterion-0.8.2 branch from e9a16e5 to 9472f1d Compare February 26, 2026 21:51
@dependabot dependabot bot force-pushed the dependabot/cargo/criterion-0.8.2 branch from 9472f1d to 4a6aa6f Compare February 28, 2026 15:36
grove added a commit that referenced this pull request Feb 28, 2026
- Mark P2 (intermediate aggregate / Q13) as RESOLVED
- Add Q10 to P1 (join delta value drift, same root cause as Q03)
- Update failure table: Q13 passes, Q10 added, Q15 improved to extra=1
- Add fixes #6 (comment-aware keyword parsing) and #7 (algebraic intermediate agg)
- Update deterministically passing list (Q10 removed, Q13 added)
grove added a commit that referenced this pull request Mar 2, 2026
* docs: update TPC-H plan with clean test results (14/22 pass)

- Re-run all 3 phases after resolving Docker disk space constraints
- Phase 1: 14/22 pass, Phase 2: 15/20 survive, Phase 3: 14/22 pass
- New finding: Q07 passes individually but fails in cross-query mode
- Added SemiJoin performance observations (30-80x slowdown cycles 2-3)
- Rewrote priority list as P1-P8 with impact/difficulty analysis
- Updated query compatibility table with accurate pass/fail status

* feat(sql-gaps-7): complete F9 monotonicity audit, 62 E2E tests, F50 benchmark

F9: Add recursive_term_is_non_monotone() guard in recursive_cte.rs.
    Non-monotone recursive terms (EXCEPT, Aggregate, Window, DISTINCT,
    AntiJoin, Intersect-set) automatically fall back to recomputation.
    11 unit tests added (936 total).

F17-F26+F48: Implement 62 E2E tests across 10 new test files:
  - e2e_aggregate_coverage_tests (18 tests, all aggregate families)
  - e2e_full_join_tests (5 tests, NULL keys, key migration)
  - e2e_set_operation_tests (6 tests, INTERSECT/EXCEPT/ALL)
  - e2e_scalar_subquery_tests (4 tests, correlated + NULL)
  - e2e_sublink_or_tests (4 tests, EXISTS/IN OR combinations)
  - e2e_multi_window_tests (6 tests, frames, ranking, LAG/LEAD)
  - e2e_guc_variation_tests (7 tests, all performance GUCs)
  - e2e_multi_cycle_tests (5 tests, prepared stmt cache)
  - e2e_having_transition_tests (7 tests, threshold oscillation)
  - e2e_keyless_duplicate_tests (7 tests, ctid-based identity)

F50: Add bench_covering_index_overhead to e2e_bench_tests.rs.

Plan: SQL_GAPS_7 is 50/51 complete (only F40 deferred).
Docs: SQL_REFERENCE.md, ARCHITECTURE.md updated with monotonicity info.

* fix(dvm): SemiJoin/AntiJoin Part 1 R_old snapshot + scalar aggregate singleton preservation

Two DVM delta correctness fixes, improving TPC-H Phase 1 from 15/22 to 17/22:

1. SemiJoin/AntiJoin Part 1: DELETEs now check EXISTS/NOT EXISTS against
   R_old (pre-change right) instead of R_current. When RF2 deletes rows
   from both sides simultaneously, the old left row's qualification must
   be evaluated against the old right state. INSERTs still check R_current.
   Fixes Q04 (was failing cycle 3 with cumulative drift).

2. Scalar aggregate singleton preservation: Scalar aggregates (no GROUP BY)
   never delete the singleton ST row. PostgreSQL's SELECT SUM(x) FROM empty
   always returns 1 row (NULL). The merge CTE now skips the 'D' action for
   scalar aggregates and emits NULL for SUM/MIN/MAX when count drops to 0.
   Fixes Q19 (was failing cycle 2 with ST=0 rows).

* docs: update TPC-H plan — 17/22 pass, Q04+Q19 fixed

Update scorecard (15/22 → 17/22), add Q04 and Q19 to Resolved section,
renumber remaining priorities (P1=Q03, P2=Q13, P3=Q15, P4=Q02/Q17).

* feat: implement SQL_GAPS_7 Tier 0 + Tier 1 correctness fixes

Tier 0 (F1–F7):
- F2: WAL decoder rejects keyless tables + requires REPLICA IDENTITY FULL
- F3: WAL decoder parses old-key section for UPDATE old_* columns
- F6: Track ALTER TYPE events — reinit STs with columns of altered type
- F7: Track ALTER POLICY / RLS events — reinit downstream STs

Tier 1 (F8–F12):
- F8: 2 E2E tests for window partition key changes (ROW_NUMBER, SUM)
- F10: Track ALTER DOMAIN events — reuses type handler

Includes 6 new unit tests for parse_pgoutput_old_columns.
All 923 unit tests pass, clippy clean.

* docs: SQL_GAPS_7 documentation updates

- F1: Remove stale pg_trickle.merge_strategy row from ARCHITECTURE.md GUC table
- F11: Expand keyless table section in SQL_REFERENCE.md with G7.1 duplicate row warning
- F12: Add PgBouncer compatibility FAQ section with pooling mode guidance

* docs: update SQL_GAPS_7.md — Tier 0 complete, Tier 1 4/5

Mark 11/51 steps done (F1–F8, F10–F12). Update summary tables,
1.0 readiness assessment, and add prioritized remaining work section.
F9 (recursive CTE monotonicity) is the only remaining Tier 1 item.

* feat: implement SQL_GAPS_7 tiers 2-5 (F13-F51)

Tier 2 — Robustness:
- F13: Warn on LIMIT in subquery without ORDER BY
- F15: RANGE_AGG/RANGE_INTERSECT_AGG recognition
- F16: Read replica detection (pg_is_in_recovery guard)

Tier 3 — Test Coverage (stubs):
- F17-F26, F48: E2E test stubs for aggregates, FULL JOIN, set ops,
  scalar subqueries, SubLinks-in-OR, multi-window, GUC variation,
  multi-cycle refresh, HAVING transitions, keyless duplicates

Tier 4 — Operational Hardening:
- F27: Expose adaptive threshold via stream_tables_info view
- F29: SPI SQLSTATE classification for retry logic
- F30: delta_row_count, merge_strategy_used, was_full_fallback in refresh history
- F31: StaleData NOTIFY emitted consistently on schedule overrun
- F32: WAL transition 3x progressive timeout with backoff
- F33: WAL column rename detection via missing-column check
- F34: SpiPermissionError variant with clear messaging
- F35: Block user triggers on pgtrickle_changes tables
- F37: DISTINCT ON without ORDER BY warning
- F38: NATURAL JOIN column drift warning
- F39: Drop orphaned change buffer columns on sync

Tier 5 — Nice-to-Have:
- F41: Wide table MERGE hash shortcut (>50 cols uses md5)
- F42-F44: FAQ docs for memory limits, sequential processing, connections
- F45: Temp file usage tracking via pg_stat_statements
- F46: pg_trickle.buffer_alert_threshold GUC
- F47: pgtrickle.st_auto_threshold() SQL function
- F49: Generated column filter in build_column_snapshot
- F51: REVOKE ALL on pgtrickle_changes schema from PUBLIC

925 unit tests passing, clean lint.

* docs: update SQL_GAPS_7.md with tier 2-5 completion status

37/51 steps done, 10 E2E test stubs created, 4 items deferred.
Remaining: F9 (audit), F17-F26+F48 (test implementations), F40, F50.

* feat(sql-gaps-7): complete F9 monotonicity audit, 62 E2E tests, F50 benchmark

F9: Add recursive_term_is_non_monotone() guard in recursive_cte.rs.
    Non-monotone recursive terms (EXCEPT, Aggregate, Window, DISTINCT,
    AntiJoin, Intersect-set) automatically fall back to recomputation.
    11 unit tests added (936 total).

F17-F26+F48: Implement 62 E2E tests across 10 new test files:
  - e2e_aggregate_coverage_tests (18 tests, all aggregate families)
  - e2e_full_join_tests (5 tests, NULL keys, key migration)
  - e2e_set_operation_tests (6 tests, INTERSECT/EXCEPT/ALL)
  - e2e_scalar_subquery_tests (4 tests, correlated + NULL)
  - e2e_sublink_or_tests (4 tests, EXISTS/IN OR combinations)
  - e2e_multi_window_tests (6 tests, frames, ranking, LAG/LEAD)
  - e2e_guc_variation_tests (7 tests, all performance GUCs)
  - e2e_multi_cycle_tests (5 tests, prepared stmt cache)
  - e2e_having_transition_tests (7 tests, threshold oscillation)
  - e2e_keyless_duplicate_tests (7 tests, ctid-based identity)

F50: Add bench_covering_index_overhead to e2e_bench_tests.rs.

Plan: SQL_GAPS_7 is 50/51 complete (only F40 deferred).
Docs: SQL_REFERENCE.md, ARCHITECTURE.md updated with monotonicity info.

* fix(ci): add palloc0 and error reporting stubs to pg_stub.c

The unit test binary references palloc0 and PG error reporting symbols
(errcode, errmsg, errdetail, errhint, errcontext_msg, errstart, errfinish)
which are not available outside the postgres process. On Linux CI with
LD_PRELOAD, the missing palloc0 caused 'undefined symbol' at load time
(exit code 127). Add no-op stubs for all missing PG symbols.

* docs: update TPC-H plan — Phase 2 16/20, Phase 3 17/22, L₀ nested revert noted

* fix(dvm): LEFT JOIN Part 4/5 R_old snapshot for null-padded transitions

Part 4/5 of the LEFT JOIN delta now verify the pre-change right state
(R_old) before emitting NULL-padded D/I rows:

- Part 4: only emits D(NULL-padded) when the left row had NO matching
  right rows before the current cycle (NOT EXISTS against R_old).
  Previously emitted D for ALL left rows matching the new right INSERT,
  even those with existing matches — harmless for direct MERGE but
  corrupts intermediate aggregate EXCEPT ALL old-state reconstruction.

- Part 5: only emits I(NULL-padded) when the left row HAD matching
  right rows before (EXISTS against R_old). Prevents spurious null-padded
  I rows when a right DELETE is for a left row that was already null-padded.

R_old = R_current EXCEPT ALL Δ_inserts UNION ALL Δ_deletes.

No TPC-H score change (17/22, 16/20, 17/22) — Q13 unaffected because
NULL o_orderkey doesn't affect COUNT(o_orderkey). But the fix prevents
subtle EXCEPT ALL corruption for other intermediate aggregate patterns.

Updated plan document with investigation findings for Q13.

* fix(dvm): algebraic intermediate aggregate path + comment-aware keyword parsing

- Add is_algebraically_invertible() helper for COUNT/COUNT(*)/SUM
- Split build_intermediate_agg_delta into algebraic and EXCEPT ALL paths:
  - Algebraic: old = COALESCE(new, 0) - ins + del via delta CTE LEFT JOIN new-rescan
  - EXCEPT ALL: preserved for MIN/MAX/group-rescan aggregates
- find_top_level_keyword() now skips -- single-line and /* */ block comments
  to prevent inject_pgt_count from matching keywords inside SQL comments
- Eliminates duplicate diff_node(child) call for invertible aggregates
- 936 unit tests pass, E2E: 17/22 (no regressions)
- Q10 confirmed as pre-existing join delta value drift (same root cause as Q03)

* docs: update TPC-H plan — P2 resolved, Q10 classified

- Mark P2 (intermediate aggregate / Q13) as RESOLVED
- Add Q10 to P1 (join delta value drift, same root cause as Q03)
- Update failure table: Q13 passes, Q10 added, Q15 improved to extra=1
- Add fixes #6 (comment-aware keyword parsing) and #7 (algebraic intermediate agg)
- Update deterministically passing list (Q10 removed, Q13 added)

* fix(dvm): nested join correction term (Part 3) for Q03/Q10 double-counting

Inner join Part 2 uses L₁ (post-change) for nested join children
because computing L₀ via EXCEPT ALL is too expensive for multi-table
chains.  When both sides change simultaneously (e.g., RF1 inserts
into both lineitem and orders), Part 2 double-counts ΔL ⋈ ΔR overlap.

Add Part 3 correction term that joins both delta CTEs directly (ΔL ⋈ ΔR)
with action adjustments:
- ΔL_I rows: emit with flipped ΔR action (cancels excess from L₁)
- ΔL_D rows: emit with original ΔR action (adds missing contribution)

is_shallow_join() guard limits correction to one level of nesting
(left child is a join of two Scan nodes) to avoid cascading CTE
complexity that crashes PostgreSQL's planner on deeper chains (8-table
Q08 caused a server crash without this guard).

TPC-H results: 19/22 pass (+2: Q03, Q10 now pass all 3 cycles)

* docs: update TPC-H plan — 19/22, P1 resolved

* fix(dvm): Q15 scalar subquery delta — row_id mismatch + L₀ for subquery children

Three independent fixes resolve Q15's data mismatch (ST=2, Q=1, extra=1):

1. Scalar subquery Part 2 C₀ pre-change snapshot (scalar_subquery.rs):
   Part 2 now uses C₀ (pre-change child) instead of C₁ when computing
   parent × Δchild. Follows DBSP formula Δ(C×S) = (ΔC×S₁) + (C₀×ΔS).
   Applies to SELECT-list scalar subqueries (not Q15's codepath but
   improves correctness for other patterns).

2. InnerJoin L₀ for Subquery/Aggregate children (join.rs):
   Extended L₀ pre-change snapshot from Scan-only to all non-join children.
   Q15's inner cross join between revenue0 and __pgt_sq_1 (both Subquery
   children depending on lineitem) needs L₀ to avoid missed DELETEs.
   is_join_child() helper distinguishes nested joins (L₁ + correction)
   from Subquery/Aggregate (L₀ via EXCEPT ALL).

3. Project row_id unwrap_transparent + build_hash_expr parens:
   (a) row_id_key_columns() and diff_project() now look through Filter
   and Subquery wrappers via unwrap_transparent() to find the underlying
   join/lateral operator. Q15 has Project > Filter > InnerJoin — without
   unwrapping, FULL refresh used position-based row_to_json+row_number
   while DIFF used content-based hashing — DELETE never matched.
   (b) build_hash_expr() wraps expressions in parens before ::TEXT cast:
   (expr)::TEXT prevents SQL precedence from casting only the last operand.

TPC-H: 20/22 pass (+1), 2 skip (Q02, Q17). 941 unit tests.

* docs: update TPC-H plan — 20/22, P3 resolved

* feat(dvm): correlated scalar subquery decorrelation (Q02, Q17)

Add catalog-based correlation detection and decorrelation engine for
scalar subqueries in WHERE clauses. Detects bare outer-column references
(not dot-qualified) by querying pg_attribute for outer-only table columns.
Transforms correlated subqueries into non-correlated GROUP BY subqueries
added as comma-joins, avoiding SQL precedence issues with INNER JOIN on
comma-separated FROM.

Q02 LIKE '%BRASS' rewritten to right(p_type, 5) = 'BRASS' (A_Expr kind 7).

TPC-H: 20/22 → 22/22 (100%), all 3 mutation cycles pass.

* docs: update TPC-H plan — 22/22, P4 resolved

* perf(dvm): materialize R_old CTE in SemiJoin/AntiJoin delta (P6)

Promote the R_old pre-change right snapshot from an inline subquery to a
MATERIALIZED CTE in both SemiJoin and AntiJoin delta operators. This
prevents PostgreSQL from re-evaluating the expensive EXCEPT ALL / UNION ALL
set operation for every EXISTS check in Part 1 and Part 2.

Added add_materialized_cte() to DiffContext which emits
'name AS MATERIALIZED (sql)' in the WITH clause. The existing add_cte()
and add_recursive_cte() methods are unchanged.

Performance results (SF=0.01, Phase 1 cycles 2-3):
  Q04: 2,000ms → 59ms  (34× faster, constant time)
  Q21: 5,400ms → 1,880ms (2.9× faster)
  Q18: ~same (bottleneck is left-side snapshot, not R_old)
  Q20: ~same (bottleneck is left-side snapshot, not R_old)
  Phase 2 cross-query cycle: 16s → 9.4s (41% reduction)

All 22 TPC-H queries pass across all 3 phases. 946 unit tests pass.

* docs: update TPC-H plan — P5 investigated, P6 resolved

P5 (Q07 Phase 2 cross-query): Investigated and confirmed as a delta
computation bug (not frontier/cleanup). FULL refresh fixes it; the next
differential fails again. Root cause: deep 6-table join chain lacks Part 3
correction at non-shallow levels. Upgraded difficulty to Hard.

P6 (SemiJoin/AntiJoin perf): Resolved via R_old materialization.
Q04 34× faster, Q21 2.9× faster. Added P7 for remaining Q18/Q20
left-snapshot optimization.

* Add TPC-H Fair Use disclaimers to all TPC-H-derived files

- Rename references from 'TPC-H' to 'TPC-H-derived' where appropriate
- Add trademark acknowledgement and Fair Use disclaimer to:
  - tests/e2e_tpch_tests.rs (module doc comment)
  - tests/tpch/schema.sql (file header)
  - tests/tpch/datagen.sql (file header)
  - plans/testing/PLAN_TEST_SUITE_TPC_H.md (title + blockquote)
  - plans/testing/PLAN_TEST_SUITES.md (section heading + blockquote)
- Clarifies that our workload does not constitute a TPC-H Benchmark result

* Add TPC-H-derived performance benchmarking plan

5-phase plan to leverage the 22-query TPC-H-derived correctness suite as
a performance benchmark:
- Phase 1: Instrument harness (PGS_PROFILE extraction, warm-up, summary)
- Phase 2: Baseline measurement at SF-0.01 and SF-0.1
- Phase 3: 5 targeted optimizations (SemiJoin pre-filtering, stmt-level
  CDC, UNLOGGED buffers, adaptive threshold, aggregate saturation)
- Phase 4: Criterion benchmark extensions
- Phase 5: Re-benchmark and report
Estimated effort: 36-49 hours across 4 sessions.

* feat(dvm): L₀ for non-SemiJoin join children (P5) + delta-key pre-filtering (P7)

P5: Extend L₀ pre-change snapshot (EXCEPT ALL) to nested join children
whose subtrees contain no SemiJoin/AntiJoin nodes. Fixes Q07 Phase 2
cross-query interference where the shallow Part 3 correction couldn't
reach deeper nesting levels in the 6-table join chain.

- Add contains_semijoin() subtree classifier
- Add inside_semijoin context flag on DiffContext (set in diff_semi_join
  and diff_anti_join) to prevent L₀ usage inside SemiJoin ancestors

P7: Pre-filter SemiJoin/AntiJoin Part 2 left snapshot using equi-join
keys from delta_right. Converts O(|L|) scan to O(|ΔR|) for Q18/Q20/Q21.

- Add extract_equijoin_keys_aliased() to join_common.rs
- Apply WHERE key IN (SELECT DISTINCT key FROM delta) wrapping in both
  semi_join.rs and anti_join.rs

952/952 unit tests pass. E2E verification pending (Docker image rebuild).

* fix(test): aggressive autovacuum + VACUUM for TPC-H benchmarks

- Configure aggressive autovacuum in new_bench() (scale_factor=0.01,
  naptime=5s, cost_delay=2ms, cost_limit=1000) to prevent dead tuple
  accumulation during multi-cycle TPC-H runs
- Add explicit VACUUM after each mutation cycle in all 3 test phases
- Set temp_file_limit=512MB to prevent unbounded temp file growth
- Add debug1-level cache HIT/MISS logging and SQL dump on MERGE failure
  in refresh.rs for TPC-H debugging
- Add predicate pushdown code (DISABLED) in parser.rs — experimental
  cross-join promotion investigated during P5, disabled due to cycle-2
  syntax errors

* docs: update TPC-H plan — P5+P7 resolved, all priorities complete

Mark P5 (cross-query Q07 interference) and P7 (SemiJoin delta-key
pre-filtering) as RESOLVED. All priorities P1-P7 now complete.
Add fix descriptions #13 (L₀ for non-SemiJoin joins), #14 (delta-key
pre-filtering), #15 (Docker disk bloat prevention). Update scorecard
and remaining work section.

* fix: limit L₀ EXCEPT ALL to ≤ 2-table join subtrees

join_scan_count(left) <= 2 prevents temp file bloat (was 159GB at SF=0.01
for 5+ table deep join chains). L₀ now only used for leaf scans, non-join
children, and 2-table join subtrees. 3+ table joins use L₁ fallback.

Added join_scan_count() function, unit tests for scan counting and
deep-join L₁ fallback, temp_file_limit=4GB safety net.

Phase 1: 22/22, Phase 2: 21/22 (Q07 known), Phase 3: 22/22

* docs: TPC Fair Use compliance audit

- Add TPC disclaimers to CHANGELOG.md and ROADMAP.md
- Use 'TPC-H-derived' consistently in public-facing files
- Fix TOC entry in PLAN_TEST_SUITES.md
- Update PLAN_TEST_SUITE_TPC_H.md with latest results and P5 scan limit
- Fix planned section name in PLAN_TPC_H_BENCHMARKING.md

* ci: integrate TPC-H-derived tests into E2E CI job

- Add 'Run TPC-H-derived correctness tests' step to e2e-tests job
  in .github/workflows/ci.yml (runs --ignored tests on push to main)
- Bump e2e-tests timeout from 25 to 30 min to accommodate TPC-H
- Update PLAN_TEST_SUITE_TPC_H.md: status COMPLETE, CI integrated,
  add prioritized remaining work (R1-R3)
- Update e2e_tpch_tests.rs module doc to mention CI integration

Verified: Phase 1 22/22, Phase 2 21/22 (Q07 known), Phase 3 22/22
Unit tests: 954 passed, fmt + lint clean

* fix: extend Part 3 correction to 3-scan joins, quote Expr identifiers, add NOT MATERIALIZED CTE support

Three improvements to the DVM join delta engine:

1. Extend Part 3 correction from shallow joins (2-scan) to join children
   with up to 3 scan nodes — one level beyond the L₀ threshold (≤ 2).
   This generates a correction term at the first nesting level that uses
   L₁ instead of L₀, cancelling (ΔL ⋈ ΔR) double-counting.

2. Always quote table alias and column name in Expr::to_sql() to prevent
   SQL syntax errors when OpTree::alias() produces reserved keywords
   (e.g. 'join' for InnerJoin nodes). Required for future predicate
   pushdown enablement.

3. Add DiffContext::mark_cte_not_materialized() to prevent PostgreSQL
   from auto-materializing CTEs referenced ≥ 2 times (Part 3 correction
   adds a second reference to the child delta CTE). Without this, the
   materialized CTE spills temp files exceeding temp_file_limit.

Q07 investigation: revenue drift is NOT caused by L₀/L₁ double-counting
(right sides are static in TPC-H RF) or cross-product intermediates.
Root cause is deeper — likely in aggregate delta or MERGE pipeline.
Phase 1: 21/22, Phase 2: 21/22, Phase 3: 22/22.

* test: add Q07 isolation regression test, update TPC-H plan

- Add test_tpch_q07_isolation as a regression test for the BinaryOp
  parenthesisation fix (runs Q07 in isolation with RF cycles)
- Update PLAN_TEST_SUITE_TPC_H.md: all 22/22 queries pass across all
  three phases; mark R1 (Q07 drift) as resolved; add fix #17 description

* fix: parenthesise BinaryOp in project resolve_expr_to_child

resolve_expr_to_child() was missing parentheses around BinaryOp:
  format!("{l} {op} {r}") → format!("({l} {op} {r})")

This caused nested arithmetic like l_extendedprice * (1 - l_discount) to
be serialized as l_extendedprice * 1 - l_discount, producing
(price * 1) - discount instead of price * (1 - discount) due to SQL
operator precedence. Manifested as ~$2 revenue drift in TPC-H Q07.

aggregate.rs's resolve_expr_for_child() already had correct parens;
this was the only affected call site.
Bumps [criterion](https://github.com/criterion-rs/criterion.rs) from 0.5.1 to 0.8.2.
- [Release notes](https://github.com/criterion-rs/criterion.rs/releases)
- [Changelog](https://github.com/criterion-rs/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](criterion-rs/criterion.rs@0.5.1...criterion-v0.8.2)

---
updated-dependencies:
- dependency-name: criterion
  dependency-version: 0.8.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/criterion-0.8.2 branch from 4a6aa6f to ea5fed6 Compare March 2, 2026 14:21
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.

0 participants