Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The behavior of YIELD is inconsistent #3480

Closed
yixinglu opened this issue Dec 16, 2021 · 1 comment
Closed

The behavior of YIELD is inconsistent #3480

yixinglu opened this issue Dec 16, 2021 · 1 comment
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@yixinglu
Copy link
Contributor

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Steps to reproduce the behavior:

(root@nebula) [nba_int_vid]> unwind [[1,3,5],[0]] as e return e | yield reduce(s=list[], i IN collect($-.e) | s + i) AS a
+--------------+
| a            |
+--------------+
| [1, 3, 5, 0] |
+--------------+
Got 1 rows (time spent 5322/5902 us)

Thu, 16 Dec 2021 11:30:40 CST

(root@nebula) [nba_int_vid]> unwind [[1,3,5],[0]] as e return e | yield reduce(s=list[], i IN collect($-.e) | s + i) AS a | yield $-.a
[ERROR (-1009)]: SemanticError: `$-.a', not exist prop `a'

Thu, 16 Dec 2021 11:30:48 CST

BUT it's ok for following query:

(root@nebula) [nba_int_vid]> yield 4 as t | yield reduce(s=list[], i IN [$-.t] | s + i) as a
+-----+
| a   |
+-----+
| [4] |
+-----+
Got 1 rows (time spent 2330/2827 us)

Thu, 16 Dec 2021 11:34:53 CST
(root@nebula) [nba_int_vid]> yield 4 as t | yield reduce(s=list[], i IN [$-.t] | s + i) as a | yield $-.a
+------+
| $-.a |
+------+
| [4]  |
+------+

What's the difference between above two queries? It's so confused for me.

@nevermore3
Copy link
Contributor

refer to #3506
disable mixed usage of cypher & ngql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants