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

wrong "go" example in ngql #2051

Closed
ttklm20 opened this issue Aug 8, 2022 · 1 comment
Closed

wrong "go" example in ngql #2051

ttklm20 opened this issue Aug 8, 2022 · 1 comment

Comments

@ttklm20
Copy link

ttklm20 commented Aug 8, 2022

GO 2 STEPS FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($).age AS age \| GROUP BY $-.dst YIELD $-.dst AS dst, collect_set($-.src) AS src, collect($-.age) AS age 

This doesn't produce outputs according to age. The reason is that the age belongs to the destination node. The right one may like the following

GO 1 STEPS FROM "player101" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($$).age AS age | GROUP BY $-.age YIELD $-.age AS age, collect_set($-.src) AS src, collect_set($-.dst) AS dst
@abby-cyber
Copy link
Contributor

abby-cyber commented Aug 8, 2022

Thank you for your feedback, but there are two syntactical errors existing in the first statement.

GO 2 STEPS FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($).age AS age \| GROUP BY $-.dst YIELD $-.dst AS dst, collect_set($-.src) AS src, collect($-.age) AS age 
- \
+ properties($$)

The correct one should be GO 2 STEPS FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($$).age AS age | GROUP BY $-.dst YIELD $-.dst AS dst, collect_set($-.src) AS src, collect($-.age) AS age

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants