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

does nebula support outputting the attributes of a specified tag of a vertex? #5329

Closed
may11544 opened this issue Feb 9, 2023 · 6 comments · Fixed by #5440
Closed

does nebula support outputting the attributes of a specified tag of a vertex? #5329

may11544 opened this issue Feb 9, 2023 · 6 comments · Fixed by #5440
Assignees
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/major Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@may11544
Copy link

may11544 commented Feb 9, 2023

nebula version:2022.11.15-nightly

A simple example.I want to get all attributes with the tag name of default on vertex with the vid of 10.2.29.88.
Think according to inertia,I will write ngql statements like this

MATCH (v) WHERE id(v) IN ["10.2.29.88"] RETURN properties(v.default)
or
MATCH (v) WHERE id(v) IN ["10.2.29.88"] RETURN properties(v:default)

But the above two statements will report errors

It is said that nebula already supports the writing method of .

What I want to know is that there is something wrong with my writing method or the current version does not support

@xtcyclist xtcyclist added the type/bug Type: something is unexpected label Feb 10, 2023
@xtcyclist xtcyclist added this to the v3.5.0 milestone Feb 10, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Feb 10, 2023
@xtcyclist
Copy link
Contributor

xtcyclist commented Feb 10, 2023

Bug:

(root@nebula) [nba]> match (v) where id(v) == "Tim Duncan" return v.player
+----------------------+
| v.player             |
+----------------------+
| {}                   |
+----------------------+
Got 1 rows (time spent 2982/3311 us)

Expected:

(root@nebula) [nba]> match (v) where id(v) == "Tim Duncan" return v.player
+-------------------------------+
| v.player                      |
+-------------------------------+
| {age: 42, name: "Tim Duncan"} |
+-------------------------------+
Got 1 rows (time spent 2863/3245 us)

@Milittle
Copy link
Contributor

nebula version:2022.11.15-nightly

A simple example.I want to get all attributes with the tag name of default on vertex with the vid of 10.2.29.88. Think according to inertia,I will write ngql statements like this

MATCH (v) WHERE id(v) IN ["10.2.29.88"] RETURN properties(v.default) or MATCH (v) WHERE id(v) IN ["10.2.29.88"] RETURN properties(v:default)

But the above two statements will report errors

It is said that nebula already supports the writing method of .

What I want to know is that there is something wrong with my writing method or the current version does not support

wrokaround: you can use the follow manner:

MATCH (v:default) WHERE id(v) IN ["10.2.29.88"] RETURN v;

@xtcyclist xtcyclist self-assigned this Feb 27, 2023
@HarrisChu HarrisChu added the severity/major Severity of bug label Mar 9, 2023
@github-actions github-actions bot removed the severity/none Severity of bug label Mar 9, 2023
@xtcyclist
Copy link
Contributor

It's a bug from the optimizer. The requested properties have been pruned out, as the optimizer thought they were not needed.

@wey-gu
Copy link
Contributor

wey-gu commented Mar 27, 2023

Yes, this should be implemented(to express all properties on the given tag in some way) when the tag is required as a nebulagraph cypher dialect, or the workaround will introduce extra scan and fetch efforts like properties(v), v

Looking forward to the expression of RETURN v.player or RETURN properties(v.player)

@xtcyclist
Copy link
Contributor

Yes, this should be implemented(to express all properties on the given tag in some way) when the tag is required as a nebulagraph cypher dialect, or the workaround will introduce extra scan and fetch efforts like properties(v), v

Looking forward to the expression of RETURN v.player or RETURN properties(v.player)

It's already implemented. The executor supports it. It's just that the optimizer didn't expect v.tag and pruned all properties of it.

@wey-gu
Copy link
Contributor

wey-gu commented Mar 27, 2023

Yes, this should be implemented(to express all properties on the given tag in some way) when the tag is required as a nebulagraph cypher dialect, or the workaround will introduce extra scan and fetch efforts like properties(v), v
Looking forward to the expression of RETURN v.player or RETURN properties(v.player)

It's already implemented. The executor supports it. It's just that the optimizer didn't expect v.tag and pruned all properties of it.

You are amazing ❤.

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/fixed Process of bug severity/major Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants