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

Move input rows of Join based on lifetime analysis #4186

Closed
Shylock-Hg opened this issue Apr 20, 2022 · 0 comments · Fixed by #4283
Closed

Move input rows of Join based on lifetime analysis #4186

Shylock-Hg opened this issue Apr 20, 2022 · 0 comments · Fixed by #4283
Assignees
Labels
type/enhancement Type: make the code neat or more efficient
Milestone

Comments

@Shylock-Hg
Copy link
Contributor

Shylock-Hg commented Apr 20, 2022

Introduction

In current hash Join implementation, we have probe row and hash row(in hash table), probe row only probe once in the whole executing, so we could move it to result directly, hash row may be probed multiple times so can't move directly.
Subjob of #4122

Contents

e.g.

      """
      explain format = 'dot'
      MATCH
        (country:Country)<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-
        (person:Person)<-[:HAS_MEMBER]-(forum:Forum)
      WHERE id(country) == "Belarus"
      WITH forum, count(person) AS numberOfMembers, forum.Forum.id AS forumId
      ORDER BY numberOfMembers DESC, forumId ASC
      LIMIT 100
      WITH collect(forum) AS popularForums
      UNWIND popularForums AS forum
      MATCH
        (forum)-[:HAS_MEMBER]->(person:Person)
      OPTIONAL MATCH
        (person)<-[:HAS_CREATOR]-(post:Post)<-[:CONTAINER_OF]-(popularForum:Forum)
      WHERE popularForum IN popularForums
      RETURN
        person.Person.id AS personId,
        person.Person.firstName AS personFirstName,
        person.Person.lastName AS personLastName,
        person.Person.creationDate AS personCreationDate,
        count(DISTINCT post) AS postCount
      ORDER BY
        postCount DESC,
        personId ASC
      LIMIT 100
      """

graphviz (4)

Related work

@Shylock-Hg Shylock-Hg added the type/enhancement Type: make the code neat or more efficient label Apr 20, 2022
@Shylock-Hg Shylock-Hg added this to the v3.2.0 milestone Apr 20, 2022
@Shylock-Hg Shylock-Hg self-assigned this Apr 20, 2022
@Shylock-Hg Shylock-Hg changed the title Move input rows of Join Move input rows of Join based on lifetme analysis Apr 20, 2022
@Shylock-Hg Shylock-Hg changed the title Move input rows of Join based on lifetme analysis Move input rows of Join based on lifetime analysis Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant