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

go and filter #4573

Closed
caton-hpg opened this issue Aug 23, 2022 · 7 comments
Closed

go and filter #4573

caton-hpg opened this issue Aug 23, 2022 · 7 comments
Assignees
Labels
type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Milestone

Comments

@caton-hpg
Copy link
Contributor

caton-hpg commented Aug 23, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

  • bug:
(root@nebula) [space3]>  GO 1 to 2 steps FROM 'a' OVER * where properties($^).name != 'b' and properties($$).name != 'b' YIELD src(edge),dst(edge),properties($^).name,properties($$).name
+-----------+-----------+---------------------+---------------------+
| src(EDGE) | dst(EDGE) | properties($^).name | properties($$).name |
+-----------+-----------+---------------------+---------------------+
+-----------+-----------+---------------------+---------------------+
Empty set (time spent 6159/6631 us)

Tue, 23 Aug 2022 14:03:35 CST

(root@nebula) [space3]>  GO 1 to 3 steps FROM 'a' OVER * where properties($^).name != 'b' and properties($$).name != 'b' YIELD src(edge),dst(edge),properties($^).name,properties($$).name
+-----------+-----------+---------------------+---------------------+
| src(EDGE) | dst(EDGE) | properties($^).name | properties($$).name |
+-----------+-----------+---------------------+---------------------+
| "c"       | "d"       | "c"                 | "d"                 |
+-----------+-----------+---------------------+---------------------+
Got 1 rows (time spent 4480/4723 us)

Tue, 23 Aug 2022 14:03:35 CST
  • schema:
INSERT VERTEX t1(name) VALUES "a":("a");
INSERT VERTEX t1(name) VALUES "b":("b");
INSERT VERTEX t1(name) VALUES "c":("c");
INSERT VERTEX t1(name) VALUES "d":("d");
INSERT EDGE e1 (weight) VALUES "a"->"b":(0.1);
INSERT EDGE e1 (weight) VALUES "b"->"c":(0.1);
INSERT EDGE e1 (weight) VALUES "c"->"d":(0.1);
  • explain
(root@nebula) [space3]> EXPLAIN format="dot" GO 1 to 4 steps FROM 'a' OVER * where properties($^).name != 'b' and properties($$).name != 'b' YIELD src(edge),dst(edge),properties($^).name,properties($$).name
Execution succeeded (time spent 889/1534 us)

Execution Plan (optimize time 261 us)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  plan
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  digraph exec_plan {
      rankdir=BT;
      "DataCollect_12"[label="{DataCollect_12|outputVar: \{\"colNames\":\[\"src(EDGE)\",\"dst(EDGE)\",\"properties($^).name\",\"properties($$).name\"\],\"type\":\"DATASET\",\"name\":\"__DataCollect_12\"\}|inputVar: \[\{\"colNames\":\[\"src(EDGE)\",\"dst(EDGE)\",\"properties($^).name\",\"properties($$).name\"\],\"type\":\"DATASET\",\"name\":\"__Project_10\"\}\]}", shape=Mrecord];
      "Loop_11"->"DataCollect_12";
      "Loop_11"[shape=diamond];
      "Project_10"->"Loop_11";
      "Loop_11"->"Start_1"[label="Do", style=dashed];
      "Start_0"->"Loop_11";
      "Project_10"[label="{Project_10|outputVar: \{\"colNames\":\[\"src(EDGE)\",\"dst(EDGE)\",\"properties($^).name\",\"properties($$).name\"\],\"type\":\"DATASET\",\"name\":\"__Project_10\"\}|inputVar: __Filter_9}", shape=Mrecord];
      "Filter_9"->"Project_10";
      "Filter_9"[label="{Filter_9|outputVar: \{\"colNames\":\[\"$^\",\"EDGE\",\"JOIN_DST_VID\",\"$$\",\"DST_VID\"\],\"type\":\"DATASET\",\"name\":\"__Filter_9\"\}|inputVar: __LeftJoin_8}", shape=Mrecord];
      "LeftJoin_8"->"Filter_9";
      "LeftJoin_8"[label="{LeftJoin_8|outputVar: \{\"colNames\":\[\"$^\",\"EDGE\",\"JOIN_DST_VID\",\"$$\",\"DST_VID\"\],\"type\":\"DATASET\",\"name\":\"__LeftJoin_8\"\}|inputVar: \{\"rightVar\":\{\"__Project_7\":\"0\"\},\"leftVar\":\{\"__Project_5\":\"0\"\}\}}", shape=Mrecord];
      "Project_7"->"LeftJoin_8";
      "Project_7"[label="{Project_7|outputVar: \{\"colNames\":\[\"$$\",\"DST_VID\"\],\"type\":\"DATASET\",\"name\":\"__Project_7\"\}|inputVar: __GetVertices_6}", shape=Mrecord];
      "GetVertices_6"->"Project_7";
      "GetVertices_6"[label="{GetVertices_6|outputVar: \{\"colNames\":\[\],\"type\":\"DATASET\",\"name\":\"__GetVertices_6\"\}|inputVar: __Project_5}", shape=Mrecord];
      "Project_5"->"GetVertices_6";
      "Project_5"[label="{Project_5|outputVar: \{\"colNames\":\[\"$^\",\"EDGE\",\"JOIN_DST_VID\"\],\"type\":\"DATASET\",\"name\":\"__Project_5\"\}|inputVar: __GetNeighbors_2}", shape=Mrecord];
      "Dedup_4"->"Project_5";
      "Dedup_4"[label="{Dedup_4|outputVar: \{\"colNames\":\[\],\"type\":\"DATASET\",\"name\":\"__VAR_0\"\}|inputVar: __Project_3}", shape=Mrecord];
      "Project_3"->"Dedup_4";
      "Project_3"[label="{Project_3|outputVar: \{\"colNames\":\[\"_vid\"\],\"type\":\"DATASET\",\"name\":\"__Project_3\"\}|inputVar: __GetNeighbors_2}", shape=Mrecord];
      "GetNeighbors_2"->"Project_3";
      "GetNeighbors_2"[label="{GetNeighbors_2|outputVar: \{\"colNames\":\[\],\"type\":\"DATASET\",\"name\":\"__GetNeighbors_2\"\}|inputVar: __VAR_0}", shape=Mrecord];
      "Start_1"->"GetNeighbors_2";
      "Start_1"[label="{Start_1|outputVar: \{\"colNames\":\[\],\"type\":\"DATASET\",\"name\":\"__Start_1\"\}|inputVar: }", shape=Mrecord];
      "Start_0"[label="{Start_0|outputVar: \{\"colNames\":\[\],\"type\":\"DATASET\",\"name\":\"__Start_0\"\}|inputVar: }", shape=Mrecord];
  }
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Expected behavior

Additional context
from https://discuss.nebula-graph.com.cn/t/topic/9849

@caton-hpg caton-hpg added the type/bug Type: something is unexpected label Aug 23, 2022
@Sophie-Xie Sophie-Xie added this to the v3.3.0 milestone Aug 23, 2022
@Shylock-Hg
Copy link
Contributor

I think it's caused by GetNeighbors retrieve start vid before apply Filter.

@wey-gu
Copy link
Contributor

wey-gu commented Aug 23, 2022

Is this issue caused by recent optimization on go? Or?

3.1.0/3.0.0 doesn't have this bug?

@Shylock-Hg
Copy link
Contributor

Is this issue caused by recent optimization on go? Or?

3.1.0/3.0.0 doesn't have this bug?

How do reproduce it?

@Shylock-Hg
Copy link
Contributor

graphviz (5)

@wey-gu
Copy link
Contributor

wey-gu commented Sep 28, 2022

Is this issue caused by recent optimization on go? Or?
3.1.0/3.0.0 doesn't have this bug?

How do reproduce it?

Sorry, I only meant to ask whether it's newly introduced by recent optimization changes on GO or it had been there for a while since 3.0 :). I didn't reproduce it myself in any other versions.

@Shylock-Hg
Copy link
Contributor

Keep origin.

@Shylock-Hg
Copy link
Contributor

Support in match in future maybe, GO keep same.

@jinyingsunny jinyingsunny added the wontfix Solution: this will not be worked on recently label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Projects
None yet
Development

No branches or pull requests

5 participants