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

What is the usage difference between properties($^) and src(edge)? #5042

Closed
abby-cyber opened this issue Dec 12, 2022 · 1 comment
Closed
Labels
affects/none PR/issue: this bug affects none version. process/done Process of bug severity/none Severity of bug type/bug Type: something is unexpected

Comments

@abby-cyber
Copy link
Contributor

abby-cyber commented Dec 12, 2022

image

image

Environment: 3.3.0

I want to use the go statement starting from "2" over sell to find "1".

I used two functions properties($^) and src(edge), but the returned vids are different.

What is the difference in the usage of these two functions properties($^) and src(edge)?

@abby-cyber abby-cyber added the type/bug Type: something is unexpected label Dec 12, 2022
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Dec 12, 2022
@nevermore3
Copy link
Contributor

src(edge) always represents the src in the edge, and $^ represents the vertex from which to expand

(root@nebula) [nba]> go from "Tim Duncan" over * reversely  yield $^ as src, $$ as dst, src(edge) as srcEdge, dst(edge) as dstEdge, edge as e
+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------+---------------------+--------------+---------------------------------------------------------------------------------+
| src                                                                                                         | dst                                                               | srcEdge             | dstEdge      | e                                                                               |
+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------+---------------------+--------------+---------------------------------------------------------------------------------+
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Aron Baynes" :player{age: 32, name: "Aron Baynes"})             | "Aron Baynes"       | "Tim Duncan" | [:like "Aron Baynes"->"Tim Duncan" @0 {likeness: 80}]                           |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Boris Diaw" :player{age: 36, name: "Boris Diaw"})               | "Boris Diaw"        | "Tim Duncan" | [:like "Boris Diaw"->"Tim Duncan" @0 {likeness: 80}]                            |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Danny Green" :player{age: 31, name: "Danny Green"})             | "Danny Green"       | "Tim Duncan" | [:like "Danny Green"->"Tim Duncan" @0 {likeness: 70}]                           |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Dejounte Murray" :player{age: 29, name: "Dejounte Murray"})     | "Dejounte Murray"   | "Tim Duncan" | [:like "Dejounte Murray"->"Tim Duncan" @0 {likeness: 99}]                       |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("LaMarcus Aldridge" :player{age: 33, name: "LaMarcus Aldridge"}) | "LaMarcus Aldridge" | "Tim Duncan" | [:like "LaMarcus Aldridge"->"Tim Duncan" @0 {likeness: 75}]                     |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Manu Ginobili" :player{age: 41, name: "Manu Ginobili"})         | "Manu Ginobili"     | "Tim Duncan" | [:like "Manu Ginobili"->"Tim Duncan" @0 {likeness: 90}]                         |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Marco Belinelli" :player{age: 32, name: "Marco Belinelli"})     | "Marco Belinelli"   | "Tim Duncan" | [:like "Marco Belinelli"->"Tim Duncan" @0 {likeness: 55}]                       |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Shaquille O'Neal" :player{age: 47, name: "Shaquille O'Neal"})   | "Shaquille O'Neal"  | "Tim Duncan" | [:like "Shaquille O'Neal"->"Tim Duncan" @0 {likeness: 80}]                      |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Tiago Splitter" :player{age: 34, name: "Tiago Splitter"})       | "Tiago Splitter"    | "Tim Duncan" | [:like "Tiago Splitter"->"Tim Duncan" @0 {likeness: 80}]                        |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Tony Parker" :player{age: 36, name: "Tony Parker"})             | "Tony Parker"       | "Tim Duncan" | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}]                           |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Manu Ginobili" :player{age: 41, name: "Manu Ginobili"})         | "Manu Ginobili"     | "Tim Duncan" | [:teammate "Manu Ginobili"->"Tim Duncan" @0 {end_year: 2016, start_year: 2002}] |
| ("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | ("Tony Parker" :player{age: 36, name: "Tony Parker"})             | "Tony Parker"       | "Tim Duncan" | [:teammate "Tony Parker"->"Tim Duncan" @0 {end_year: 2016, start_year: 2001}]   |
+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------+---------------------+--------------+---------------------------------------------------------------------------------+

@github-actions github-actions bot added the process/fixed Process of bug label Dec 12, 2022
@Hester-Gu Hester-Gu added the process/done Process of bug label Jan 13, 2023
@github-actions github-actions bot removed the process/fixed Process of bug label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. process/done Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

3 participants