Skip to content

docs: clarify CALL UNION variable scope (#3317) - #582

Open
agcodes0315 wants to merge 3 commits into
FalkorDB:mainfrom
agcodes0315:main
Open

agcodes0315 wants to merge 3 commits into
FalkorDB:mainfrom
agcodes0315:main

Conversation

@agcodes0315

@agcodes0315 agcodes0315 commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

Clarifies the visibility of imported variables across UNION and UNION ALL branches within FalkorDB CALL {} subqueries.

Problem

The existing documentation explains importing variables using an opening WITH clause but does not explicitly describe whether those variables remain accessible across subsequent UNION branches.

Issue: FalkorDB/FalkorDB#3317

Changes

  • Added a dedicated section explaining variable scope across UNION branches.
  • Included a reproducible query demonstrating the 'n' not defined error.
  • Documented behavior observed in FalkorDB 4.20.7 and 6.0.2.
  • Linked the original issue for additional context.

Verification

  • Reviewed the documentation rendering.
  • Used the reproduction results recorded in Issue #3317.
  • No independent database execution was performed for this documentation-only change.

Scope

Documentation-only clarification. No query engine modifications.

Related to FalkorDB/FalkorDB#3317.


Summary by cubic

Clarifies in the Cypher docs that, in CALL {} subqueries using UNION or UNION ALL, an opening WITH import in the first branch does not make those variables available in later branches for FalkorDB 4.20.7 and 6.0.2.

Written for commit cdf6344. Summary will update on new commits.

View guided diff

Summary by CodeRabbit

  • Documentation
    • Clarified that an opening WITH in the first CALL branch does not make its variable available in later UNION branches in FalkorDB 4.20.7 and 6.0.2.
    • Added an example of the resulting undefined-variable error and guidance to account for imports in each branch.

Document the observed variable scoping behavior across UNION
and UNION ALL branches in CALL subqueries.

Include a reproducible example and link to issue #3317.
docs: clarify CALL UNION variable scope (#3317)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread cypher/call.mdx Outdated
Comment thread cypher/call.mdx Outdated
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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: 11ca3f29-417c-4095-8461-c2231b2c24f4
📥 Commits

Reviewing files that changed from the base of the PR and between bc3b3c1 and cdf6344.

📒 Files selected for processing: 1
  • cypher/call.mdx
🚧 Files skipped from review as they are similar to previous changes: 1
  • cypher/call.mdx

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

📝 Walkthrough

The documentation describes reported CALL {} import behavior in FalkorDB 4.20.7 and 6.0.2. It includes a failing UNION example and guidance to account for imports in each branch.

Changes: CALL UNION import documentation

Layer / File(s) Summary
Document reported UNION import behavior
cypher/call.mdx
Adds a version-specific example where the second UNION branch reports 'n' not defined. Advises accounting for imports in each branch when outer-scope variables are used across branches.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to cdf63

The clarification is mergeable with normal documentation checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the documentation change about variable scope in CALL UNION branches. It matches the main change.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · 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.

@agcodes0315

Copy link
Copy Markdown
Author

I've addressed the automated review feedback for #3317. The updated documentation clarifies variable scope across UNION branches, and the latest automated reviews report no remaining actionable issues.
The PR is ready for maintainer review whenever convenient. Thank you!

This branch has not been deployed

No deployments
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