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

Support list comprehension in YIELD for list of edges #4276

Open
wey-gu opened this issue May 23, 2022 · 2 comments
Open

Support list comprehension in YIELD for list of edges #4276

wey-gu opened this issue May 23, 2022 · 2 comments
Labels
type/feature req Type: feature request

Comments

@wey-gu
Copy link
Contributor

wey-gu commented May 23, 2022

Is your feature request related to a problem? Please describe.

in Nebula, we have this pitfall: the edge variable in multiple hops is a list, and the expression of e.propName cannot be parsed, instead, e[0].propName should be used.

Thus we cannot do this:

MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) WHERE ALL(e_ in e WHERE e_.degree > 0) return e.degree

And the mitigation, for now, could be to unwind it first, which isn't straightforward for users:

MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) WHERE ALL(e_ in e WHERE e_.degree > 0) with e as eList unwind eList as e return e.degree

Describe the solution you'd like

enable something like

MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) WHERE ALL(e_ in e WHERE e_.degree > 0) return [e_.degree for e_ in e]

Describe alternatives you've considered

Or possibly parse e.degree as [e_.degree for e_ in e]?

Additional context

@wey-gu wey-gu added the type/feature req Type: feature request label May 23, 2022
@wey-gu wey-gu changed the title Support list comprehension in YIELD Support list comprehension in YIELD for list of edges May 23, 2022
@wey-gu
Copy link
Contributor Author

wey-gu commented Jul 13, 2022

@wey-gu
Copy link
Contributor Author

wey-gu commented Aug 24, 2022

This seems to be related to #4498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature req Type: feature request
Projects
None yet
Development

No branches or pull requests

1 participant