Skip to content

test(opencypher): pin the m * n multiplicity of the country-partitioned triangle count (#9298) - #9519

Merged
lvca merged 1 commit into
mainfrom
test/9298-triangle-multiplicity
Oct 8, 2026
Merged

lvca merged 1 commit into
mainfrom
test/9298-triangle-multiplicity

Conversation

@lvca

@lvca lvca commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Regression tests for #9298: parallel edges on all three sides of a triangle (6 * 2 * 3 * 2 = 72), with no view, with views, and after a commit in the delta overlay of a SYNCHRONOUS view, each compared with the row pipeline.

Carries over the test commit of #9352 (by @tae898). The perf change of that PR is obsolete after #9400, which already removed the boxed map from the OLTP fallback.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for triangle-count queries involving parallel relationships, including scenarios with un-compacted commits and analytical views. Both standard execution and count push-down are checked for consistent results.

…ed triangle count (#9298)

Parallel edges on every side of the triangle, and the SYNCHRONOUS view delta-overlay path.
Originally proposed in #9352 by Taewoon Kim.
@mergify

mergify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@claude

claude Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review

Test-only PR, and it looks good. I did not run the tests.

What I checked

  • The multiplicity arithmetic holds. Three persons give 6 orderings, and the parallel edge counts 2, 3 and 2 give 6 * 2 * 3 * 2 = 72. The overlay test gives 6 * 1 * 3 * 2 = 36 before the commit and 72 after it.
  • The new tests reuse the existing helpers (assertAllAgree, createView, count) and the fixture. knowsTimes follows the style of knows.
  • The assertions use the preferred assertThat(...) syntax. There is no wall-clock timing, no hard-coded port and no System.out.
  • explain(...) asserts that the plan contains COUNT TRIANGLES. That guards against the push-down silently falling back, which would otherwise make the test pass without exercising the code path.
  • The view is dropped in finally, so a failing assertion cannot leak state.

Minor suggestions (non-blocking)

  • explain is only asserted in the overlay test. The first new test, q3ParallelEdgesOnEverySideMultiply, could use the same plan check. It would confirm the push-down is exercised there too, if assertAllAgree doesn't already do so.
  • The overlay test's first count(written) ("before the commit") doesn't check the plan. That is fine, but the plan check could move up if you want it there as well.
  • Q3_VARS is a new constant, but the existing q3ReciprocalKnowsCountPerRelationship still passes the same literal string at line ~99. Use the constant there for consistency.

No bugs, security or performance concerns. LGTM.

@codacy-production

codacy-production Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · -5.64% coverage variation

Metric Results
Coverage variation ✅ -5.64% coverage variation
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4e1b4f0) 220084 188099 85.47%
Head commit (a07f064) 252701 (+32617) 201734 (+13635) 79.83% (-5.64%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#9519) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95b907a8-d5c3-4f86-a675-0f27dce6593f
📥 Commits

Reviewing files that changed from the base of the PR and between 607ed1f and a07f064.

📒 Files selected for processing (1)
  • engine/src/test/java/com/arcadedb/query/opencypher/Issue9298CountPushDownMultiplicityTest.java

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The test adds coverage for triangle counts with parallel KNOWS relationships. It checks both the row pipeline and count push-down, including the push-down plan after a commit to a synchronous analytical view.

Changes

Triangle Count Multiplicity Tests

Layer / File(s) Summary
Triangle multiplicity and overlay assertions
engine/src/test/java/com/arcadedb/query/opencypher/Issue9298CountPushDownMultiplicityTest.java
Adds triangle count checks for parallel KNOWS relationships. The tests compare row-pipeline and count push-down results, then verify the push-down plan and counts after a commit to a synchronous analytical view.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to a07f0

No actionable merge risk is identified; the change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the regression coverage and references the related issues, but it omits the required section headings and does not provide the Motivation, Additional Notes, or Checklist infor… Add the required sections: What does this PR do?, Motivation, Related issues, Additional Notes, and Checklist. Complete the build and unit-test checklist items, and state whether the author ran mvn clean package and covered failure and su…
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test change and the m × n multiplicity behavior for the country-partitioned triangle count. It is specific and related to the main changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the regression coverage and references the related issues, but it omits the required section headings and does not provide the Motivation, Additional Notes, or Checklist information.

Resolution

Add the required sections: What does this PR do?, Motivation, Related issues, Additional Notes, and Checklist. Complete the build and unit-test checklist items, and state whether the author ran mvn clean package and covered failure and success scenarios.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lvca
lvca merged commit 972097e into main Oct 8, 2026
@lvca
lvca deleted the test/9298-triangle-multiplicity branch October 8, 2026 16:02
@lvca lvca self-assigned this Oct 8, 2026
@lvca lvca added this to the 26.11.1 milestone Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.25%. Comparing base (4e1b4f0) to head (a07f064).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9519      +/-   ##
============================================
+ Coverage     77.23%   77.25%   +0.02%     
  Complexity     4127     4127              
============================================
  Files          2149     2149              
  Lines        220084   220084              
  Branches      47099    47099              
============================================
+ Hits         169972   170028      +56     
+ Misses        32024    31972      -52     
+ Partials      18088    18084       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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