opencypher / openCypher

Specification of the Cypher property graph query language

Home Page:http://www.opencypher.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCK procedure invocation scenario

pstutz opened this issue · comments

I have a question about this scenario:

Scenario: In-query call to procedure that both takes arguments and has outputs fails if the arguments are passed implicitly and no outputs are yielded
    And there exists a procedure test.my.proc(in :: INTEGER?) :: (out :: INTEGER?):
      | in | out |
    When executing query:
      """
      CALL test.my.proc
      RETURN out
      """
    Then a SyntaxError should be raised at compile time: UndefinedVariable

This scenario expects an UndefinedVariable syntax error, but it seems to me that a parser might already fail at RETURN, because the grammar specifies that for an explicit procedure invocation the parentheses at the end of the invocation are mandatory.

This means that failing sooner with InvalidArgumentPassingMode would be a more reasonable expectation. Does that make sense or is UndefinedVariable supposed to refer to the missing input parameter?

I would agree with you. I would think this should fail with a syntactical error in parsing, due to the lack of parenthesis in the procedure call.

This scenario is confusing to me. What is the the author's intention here? If that can not be determined I would call for dropping this scenario altogether.