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

[BUG] GOpt fails in compiling queries that involve ISNULL on certain properties #4114

Open
BingqingLyu opened this issue Aug 6, 2024 · 0 comments
Assignees

Comments

@BingqingLyu
Copy link
Collaborator

BingqingLyu commented Aug 6, 2024

Describe the bug

In the JOB Benchmark, the gopt-based compiler fails to compile queries that involve ISNULL on certain properties, including Job11, 21, and 27.

The issue arises because the graph schema does not inform the compiler that certain properties can be optional. As a result, the compiler treats these properties as non-nullable.

Take Job11a as an example, currently the compiler returns a null.

@neo4j> MATCH
        (mc:MOVIE_COMPANIES)-[:MOVIE_COMPANIES_TITLE]->(t:TITLE)-[:MOVIE_KEYWORD]->(k:KEYWORD),
        (mc)-[:MOVIE_COMPANIES_COMPANY_NAME]->(cn:COMPANY_NAME),
        (mc)-[:MOVIE_COMPANIES_TYPE]->(ct:COMPANY_TYPE),
        (t)<-[:MOVIE_LINK_TITLE]-(ml:MOVIE_LINK)-[:MOVIE_LINK_LINKED_TYPE]->(lt:LINK_TYPE)
        WHERE cn.country_code <> '[pl]'
          AND (cn.name CONTAINS 'Film' OR cn.name CONTAINS 'Warner')
          AND ct.kind = 'production companies'
          AND k.keyword = 'sequel'
          AND lt.link CONTAINS 'follow'
          AND mc.note IS NULL
          AND t.production_year >= 1950
          AND t.production_year <= 2000
        RETURN
          MIN(cn.name) AS from_company,
          MIN(lt.link) AS movie_link_type,
          MIN(t.title) AS non_polish_sequel_movie;
null
@BingqingLyu BingqingLyu changed the title [BUG] Cannot support ISNULL in JOB queries [BUG] GOpt fails in compiling queries that involve ISNULL on certain properties Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants