Skip to content

Mixed usage of ngql and cypher statements #5182

Closed
@jievince

Description

@jievince

Please check the FAQ documentation before raising an issue

Describe the bug (required)

#3506 forbids the mixed usage of ngql and cypher statements, but it forgets to handle the standalone return statement.
See the following example:

go from "Tony Parker" over like yield id($$) as vid | return $-.vid

This query should report a syntax error according to our previous design, but in fact, this query can be executed successfully before because a standalone return statement is treated as a YieldSentence in our implementation. So a standalone statement is actually a ngql statement not a cypher statement in our implementation. This strange implementation causes a bug #5113.

Pr #5116 forbids the mixed usage of ngql and return statement, but it causes incompatibility issues. After a discussion with @MuYiYong @HarrisChu , we decided to be consistent with previous behaviors.

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects/nonePR/issue: this bug affects none version.process/doneProcess of bugseverity/noneSeverity of bugtype/bugType: something is unexpected

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions