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

Fragment: project() on already projected fragment yields incorrect result #1223

Closed
sighingnow opened this issue Mar 1, 2023 · 0 comments · Fixed by #1224
Closed

Fragment: project() on already projected fragment yields incorrect result #1223

sighingnow opened this issue Mar 1, 2023 · 0 comments · Fixed by #1224
Labels

Comments

@sighingnow
Copy link
Member

Describe your problem

PR #239 (and alibaba/GraphScope#211) introduced the "general project" feature to property fragment, but it yields incorrect result when when do project() on an already projected fragment. E.g.

def test_projected_on_project():
    graph = load_ldbc()
    pg1 = graph.project(vertices={"post": [], "tag":[], "tagclass": []}, edges={"hasTag": [], "isSubclassOf": []})
    logger.info("pg1.schema = %s, %d", pg1.schema, pg1.vineyard_id)
    pg2 = pg1.project(vertices={"tagclass": []}, edges={"isSubclassOf": []})
    logger.info("pg2.schema = %s, %d", pg2.schema, pg2.vineyard_id)

We currently get:

2023-03-01 18:03:19,266 [INFO][test_flatten:16]: pg1.schema = oid_type: LONG
vid_type: ULONG
type: VERTEX
Label: post
Properties:

type: VERTEX
Label: tag
Properties:

type: VERTEX
Label: tagclass
Properties:

type: EDGE
Label: isSubclassOf
Properties:
Relations: [Relation(source='tagclass', destination='tagclass')]
type: EDGE
Label: hasTag
Properties:
Relations: [Relation(source='post', destination='tag')]

... 

2023-03-01 17:33:27,648 [INFO][test_flatten:18]: pg2.schema = oid_type: LONG
vid_type: ULONG
type: VERTEX
Label: post
Properties:

type: VERTEX
Label: tag
Properties:

type: VERTEX
Label: tagclass
Properties:

type: EDGE
Label: isSubclassOf
Properties:
Relations: [Relation(source='tagclass', destination='tagclass')]
type: EDGE
Label: hasTag
Properties:
Relations: [Relation(source='post', destination='tag')]

Which is wrong.

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

Successfully merging a pull request may close this issue.

1 participant