Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Cannot pass parameters in algo.dfs.stream call #930

Copy link
Copy link
Open
@maxlazarus

Description

@maxlazarus
Issue body actions

Tried to follow instructions for passing parameters on https://neo4j.com/docs/graph-algorithms/3.5/projected-graph-model/cypher-projection/#cypher-projection-parameters

Using Neo4j 3.5.3, graph-algorithms 3.5.4.0

Example:
Query 1: setup nodes and relationships

create (:TestNode{key:1, name:"A"})-[:CONNECTS]->(:TestNode{key:2, name:"B"})

Query 2: setup param

:param name => 'B'

Query 3 succeeds, the $name param is present but not used in the projection:

MATCH (start:TestNode{key:1})
CALL algo.dfs.stream(
    'match (t:TestNode) return id(t) as id',
    'match (t:TestNode)-[c:CONNECTS]->(u:TestNode) return id(t) as source, id(u) as target',
    '>',
    id(start),
    {
        graph:'cypher',
        params: {name: $name}
    }
)
YIELD nodeIds
UNWIND nodeIds AS nodeId
WITH algo.asNode(nodeId) AS n
RETURN n

Query 4 fails:

MATCH (start:TestNode{key:1})
CALL algo.dfs.stream(
    'match (t:TestNode) where t.name <> $name return id(t) as id',
    'match (t:TestNode)-[c:CONNECTS]->(u:TestNode) return id(t) as source, id(u) as target',
    '>',
    id(start),
    {
        graph:'cypher',
        params: {name: $name}
    }
)
YIELD nodeIds
UNWIND nodeIds AS nodeId
WITH algo.asNode(nodeId) AS n
RETURN n

Error:
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure algo.dfs.stream: Caused by: org.neo4j.cypher.ParameterNotFoundException: Expected parameter(s): name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.