Conversation
WalkthroughThe changes introduce a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can disable sequence diagrams in the walkthrough.Disable the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cypher/models/pgsql/test/translation_cases/multipart.sql`:
- Line 48: The recursive CTE s2 only seeds depth=1 paths from edge e0, so *0..
is missing the zero-length (root = target) case; add a zero-depth seed row to s2
before the existing seed (or union it) that sets root_id = e0.end_id, next_id =
e0.end_id, depth = 0, satisfied based on the same predicate used for the seed
(e.g. (n1.properties ->> 'objectid') like '%-516' and n1.kind_ids @> ...),
is_cycle = false (or true as appropriate), and path = an empty array (array[]
cast to the same id array type) so the recursive walk includes the 0-hop branch.
Reference: modify the s2(...) AS (select ... from edge e0 ...) seed block that
currently creates (e0.end_id, e0.start_id, 1, ...) to also include the
zero-depth union entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d2288301-b1de-4c99-a6df-4a399e1dd1e4
📒 Files selected for processing (5)
cypher/models/pgsql/test/translation_cases/multipart.sqlcypher/models/pgsql/test/translation_cases/pattern_binding.sqlcypher/models/pgsql/test/translation_cases/pattern_expansion.sqlcypher/models/pgsql/translate/expansion.gocypher/models/pgsql/translate/pattern.go
zinic
left a comment
There was a problem hiding this comment.
Good bit of plumbing. Test case changes pass muster. Ship it!
Joining expansion pattern steps is updated so that result sets contain path resolutions that satisfy the combined query pattern rather than only a part of a multi step relationship pattern.
The following examples use the active directory sample data as the data source.
Examples:
Inbound multi step relationship pattern with consecutive expansion steps
Before:

After:

Outbound multi step relationship pattern with consecutive expansion steps
Before:

After:

Inbound multi step relationship pattern with single non-expansion step joined to expansion
Before:

After:

Outbound multi step relationship pattern with single non-expansion step joined to expansion
Before:

After:

Summary by CodeRabbit