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] Unexpected when dealing with filters in match in the GOpt-based compilation #3791

Closed
BingqingLyu opened this issue May 13, 2024 · 0 comments · Fixed by #3831 or #3837
Closed
Assignees

Comments

@BingqingLyu
Copy link
Collaborator

Describe the bug

In GOpt-based compilation, the following query throws exceptions:
Query:

gremlin> g.V().match(__.as("a").out("KNOWS").as("b"), __.as("b").hasLabel("PERSON").has("gender", "male").out("KNOWS").as("c")).count()
filters =(_.gender, _UTF-8'male') not exist in the previous vertex filters null
Type ':help' or ':h' for help.

The detailed exception:

java.lang.IllegalArgumentException: filters =(_.gender, _UTF-8'male') not exist in the previous vertex filters null
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor$1.visitAndAddVertex(GraphIOProcessor.java:276)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor$1.visit(GraphIOProcessor.java:202)
        at org.apache.calcite.rel.AbstractRelNode.childrenAccept(AbstractRelNode.java:215)
        at org.apache.calcite.rel.RelVisitor.visit(RelVisitor.java:46)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor$1.visit(GraphIOProcessor.java:199)
        at org.apache.calcite.rel.AbstractRelNode.childrenAccept(AbstractRelNode.java:215)
        at org.apache.calcite.rel.RelVisitor.visit(RelVisitor.java:46)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor$1.visit(GraphIOProcessor.java:199)
        at org.apache.calcite.rel.RelVisitor.go(RelVisitor.java:63)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor.visit(GraphIOProcessor.java:390)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor$InputConvertor.visit(GraphIOProcessor.java:144)
        at com.alibaba.graphscope.common.ir.rel.graph.match.GraphLogicalMultiMatch.accept(GraphLogicalMultiMatch.java:100)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor.processInput(GraphIOProcessor.java:98)
        at com.alibaba.graphscope.common.ir.planner.GraphIOProcessor.processInput(GraphIOProcessor.java:91)
        at com.alibaba.graphscope.common.ir.planner.GraphRelOptimizer$MatchOptimizer.visit(GraphRelOptimizer.java:135)
        at com.alibaba.graphscope.common.ir.rel.graph.match.GraphLogicalMultiMatch.accept(GraphLogicalMultiMatch.java:100)
        at org.apache.calcite.rel.RelShuttleImpl.visitChild(RelShuttleImpl.java:57)
        at org.apache.calcite.rel.RelShuttleImpl.visitChildren(RelShuttleImpl.java:71)
        at com.alibaba.graphscope.common.ir.rel.GraphShuttle.visit(GraphShuttle.java:65)
        at com.alibaba.graphscope.common.ir.rel.GraphLogicalAggregate.accept(GraphLogicalAggregate.java:138)
        at com.alibaba.graphscope.common.ir.planner.GraphRelOptimizer.optimize(GraphRelOptimizer.java:107)
        at com.alibaba.graphscope.common.ir.tools.GraphPlanner$PlannerInstance.planLogical(GraphPlanner.java:118)
        at com.alibaba.graphscope.common.ir.tools.QueryCache$Key.<init>(QueryCache.java:62)
        at com.alibaba.graphscope.common.ir.tools.QueryCache.createKey(QueryCache.java:80)
        at com.alibaba.graphscope.gremlin.plugin.script.GremlinCalciteScriptEngineFactory$ScriptEngine.eval(GremlinCalciteScriptEngineFactory.java:72)
        at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
shirly121 added a commit that referenced this issue May 30, 2024
<!--
Thanks for your contribution! please review
https://github.com/alibaba/GraphScope/blob/main/CONTRIBUTING.md before
opening an issue.
-->

## What do these changes do?
as titled

<!-- Please give a short brief about these changes. -->

## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->

Fixes #3791

---------

Co-authored-by: 霄磊 <xiaolei.zl@alibaba-inc.com>
Co-authored-by: bingqing.lbq <bingqing.lbq@alibaba-inc.com>
siyuan0322 pushed a commit that referenced this issue Jun 4, 2024
…le Vertex (#3831)

Fixes #3791
---------
Co-authored-by: Longbin Lai <longbin.lailb@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants