GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: inline relationship WHERE predicate is now applied by robfrank · Pull Request #3953 · ArcadeData/arcadedb

Conversation

@robfrank

@robfrank robfrank commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3951

Inline relationship predicates like [r:KNOWS WHERE r.since < 2019] were silently ignored, causing ArcadeDB to return rows that should have been filtered out.

  • RelationshipPattern - added whereExpression: BooleanExpression field with accessors
  • CypherASTBuilder.visitRelationshipPattern() - now extracts ctx.expression() and parses it into the new field
  • MatchRelationshipStep - added matchesEdgeWhereExpression() that binds the relationship variable to a temporary result and evaluates the predicate before producing output rows

Test plan

  • OpenCypherPatternPredicateTest.InlineRelationshipPredicate#inlineWhereOnRelationshipIsApplied - undirected pattern, only the 2018 edge is returned
  • OpenCypherPatternPredicateTest.InlineRelationshipPredicate#inlineWhereOnRelationshipDirected - directed pattern, single row Alice->Bob:2018
  • OpenCypherPatternPredicateTest.InlineRelationshipPredicate#inlineWhereWithExternalWhereClause - inline predicate combined with outer WHERE
  • Full OpenCypher suite (5 377 tests) passes with zero regressions

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@robfrank @claude
fix: inline relationship WHERE predicate is now applied (#3951)
12393f0
Inline predicates like [r:KNOWS WHERE r.since < 2019] were silently
ignored because RelationshipPattern had no field for the expression,
CypherASTBuilder never extracted ctx.expression(), and
MatchRelationshipStep had no evaluation path for it.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@codacy-production

codacy-production Bot commented Apr 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 100.00% diff coverage · -8.04% coverage variation

Metric Results
Coverage variation ✅ -8.04% coverage variation
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (582167a) 118917 86638 72.86%
Head commit (9ea3084) 150173 (+31256) 97336 (+10698) 64.82% (-8.04%)

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 (#3953) 21 21 100.00%

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. Give us feedback

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot]
gemini-code-assist Bot reviewed Apr 22, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements support for inline WHERE predicates within OpenCypher relationship patterns by updating the AST, parser, and execution logic. While the core functionality is covered, feedback suggests that the optimized execution paths (fast path) may silently ignore these predicates, potentially leading to incorrect results. Additionally, there is a performance concern regarding the frequent allocation and property copying of ResultInternal objects during edge evaluation, which could be optimized to reduce overhead in large-scale graph traversals.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread engine/src/main/java/com/arcadedb/query/opencypher/executor/steps/MatchRelationshipStep.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread engine/src/main/java/com/arcadedb/query/opencypher/executor/steps/MatchRelationshipStep.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@robfrank @claude
fix: fast path bypasses inline WHERE predicate; reduce per-edge alloc…
9ea3084
…ations

canUseFastPath now returns false when the relationship pattern has an
inline WHERE expression, preventing silent predicate skipping on the
vertex-only traversal path.

matchesEdgeWhereExpression now accepts a pre-populated ResultInternal
built once per source vertex instead of allocating and copying on every
edge traversal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@robfrank
robfrank merged commit 7656946 into main Apr 22, 2026
23 of 29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lvca
lvca deleted the fix/3951-inline-relationship-predicate branch April 22, 2026 14:13
@lvca lvca assigned robfrank Apr 22, 2026
@lvca lvca added this to the 26.4.1 milestone Apr 22, 2026
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.87%. Comparing base (582167a) to head (9ea3084).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...encypher/executor/steps/MatchRelationshipStep.java 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3953      +/-   ##
==========================================
- Coverage   64.00%   63.87%   -0.13%     
==========================================
  Files        1591     1591              
  Lines      118917   118934      +17     
  Branches    25271    25275       +4     
==========================================
- Hits        76118    75975     -143     
- Misses      32309    32487     +178     
+ Partials    10490    10472      -18     

☔ View full report in Codecov by Sentry.
📢 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mergify Bot added a commit that referenced this pull request May 3, 2026
@mergify
chore(studio-deps)(deps): bump marked from 18.0.2 to 18.0.3 in /studi…
afe5b68
…o [skip ci]

Bumps [marked](https://github.com/markedjs/marked) from 18.0.2 to 18.0.3.
Release notes

*Sourced from [marked's releases](https://github.com/markedjs/marked/releases).*

> v18.0.3
> -------
>
> [18.0.3](markedjs/marked@v18.0.2...v18.0.3) (2026-05-01)
> -----------------------------------------------------------------------------------
>
> ### Bug Fixes
>
> * avoid task checkbox for setext heading text ([#3960](https://redirect.github.com/markedjs/marked/issues/3960)) ([2608e81](markedjs/marked@2608e81))


Commits

* [`e8dc395`](markedjs/marked@e8dc395) chore(release): 18.0.3 [skip ci]
* [`2608e81`](markedjs/marked@2608e81) fix: avoid task checkbox for setext heading text ([#3960](https://redirect.github.com/markedjs/marked/issues/3960))
* [`dba76f6`](markedjs/marked@dba76f6) chore(deps-dev): bump eslint from 10.2.0 to 10.2.1 ([#3953](https://redirect.github.com/markedjs/marked/issues/3953))
* [`015f1eb`](markedjs/marked@015f1eb) chore(deps-dev): bump typescript from 6.0.2 to 6.0.3 ([#3954](https://redirect.github.com/markedjs/marked/issues/3954))
* [`17c06e9`](markedjs/marked@17c06e9) chore: fix building license for docs ([#3952](https://redirect.github.com/markedjs/marked/issues/3952))
* [`55a54b5`](markedjs/marked@55a54b5) chore: Rename LICENSE.md to LICENSE for better compatibility with Bazel tooli...
* See full diff in [compare view](markedjs/marked@v18.0.2...v18.0.3)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=marked&package-manager=npm\_and\_yarn&previous-version=18.0.2&new-version=18.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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-automerge-start)
[//]: # (dependabot-automerge-end)
---
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  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)
robfrank added a commit that referenced this pull request May 12, 2026
@robfrank
fix: inline relationship WHERE predicate is now applied (#3953)
4dccd06
(cherry picked from commit 7656946)
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Jun 28, 2026
@robfrank
fix: inline relationship WHERE predicate is now applied (ArcadeData#3953
ccd2abd
)
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Jun 28, 2026
@mergify
chore(studio-deps)(deps): bump marked from 18.0.2 to 18.0.3 in /studi…
4b6632d
…o [skip ci]

Bumps [marked](https://github.com/markedjs/marked) from 18.0.2 to 18.0.3.
Release notes

*Sourced from [marked's releases](https://github.com/markedjs/marked/releases).*

> v18.0.3
> -------
>
> [18.0.3](markedjs/marked@v18.0.2...v18.0.3) (2026-05-01)
> -----------------------------------------------------------------------------------
>
> ### Bug Fixes
>
> * avoid task checkbox for setext heading text ([ArcadeData#3960](https://redirect.github.com/markedjs/marked/issues/3960)) ([2608e81](markedjs/marked@2608e81))


Commits

* [`e8dc395`](markedjs/marked@e8dc395) chore(release): 18.0.3 [skip ci]
* [`2608e81`](markedjs/marked@2608e81) fix: avoid task checkbox for setext heading text ([ArcadeData#3960](https://redirect.github.com/markedjs/marked/issues/3960))
* [`dba76f6`](markedjs/marked@dba76f6) chore(deps-dev): bump eslint from 10.2.0 to 10.2.1 ([ArcadeData#3953](https://redirect.github.com/markedjs/marked/issues/3953))
* [`015f1eb`](markedjs/marked@015f1eb) chore(deps-dev): bump typescript from 6.0.2 to 6.0.3 ([ArcadeData#3954](https://redirect.github.com/markedjs/marked/issues/3954))
* [`17c06e9`](markedjs/marked@17c06e9) chore: fix building license for docs ([ArcadeData#3952](https://redirect.github.com/markedjs/marked/issues/3952))
* [`55a54b5`](markedjs/marked@55a54b5) chore: Rename LICENSE.md to LICENSE for better compatibility with Bazel tooli...
* See full diff in [compare view](markedjs/marked@v18.0.2...v18.0.3)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=marked&package-manager=npm\_and\_yarn&previous-version=18.0.2&new-version=18.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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-automerge-start)
[//]: # (dependabot-automerge-end)
---
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  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)
This was referenced Jul 27, 2026
Pattern comprehension ignores relationship inline WHERE predicates #5460
Closed
count(*) returns 0 for relationship inline WHERE while count(r) returns the correct result #5462
Closed
count(*) returns 0 while count(r) returns 1 for a relationship inline WHERE predicate #5463
Closed
EXISTS with relationship inline WHERE returns false even for a trivially true predicate #5464
Closed
count(*) returns 0 while count(r) returns 1 for a relationship inline WHERE predicate #5466
Closed
This was referenced Jul 28, 2026
Node inline WHERE predicates are ignored in MATCH, EXISTS {} and pattern comprehensions #5480
Closed
shortestPath ignores relationship inline WHERE; as an expression it also ignores the property map (#5096 covered only the MATCH form) #5481
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@robfrank robfrank

Labels

None yet

Projects

None yet

Milestone

26.4.2

Development

Successfully merging this pull request may close these issues.

ArcadeDB may ignore a relationship predicate written directly inside the relationship pattern.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@robfrank @lvca
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.