Skip to content

Ensure generated not-join clauses only join lvars used in the body #1

@mkremins

Description

@mkremins

If we generate a not-join clause that lists three variables to join, e.g. (not-join [?e1 ?e2 ?e3] ...), and only two of these variables are referenced in the body of the not-join clause, we'll get the following error when we execute the query:

"Join variable not declared inside clauses"

This seems to happen even if all the joined variables are bound outside the not-join clause. Therefore, when we generate a not-join clause, we should omit lvars not used in the clause's body from the list of lvars to join.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions