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

there's a problem with tag's property filtering push-down #2727

Closed
nevermore3 opened this issue Jun 11, 2021 · 8 comments
Closed

there's a problem with tag's property filtering push-down #2727

nevermore3 opened this issue Jun 11, 2021 · 8 comments
Assignees
Labels
need to discuss Solution: issue or PR without a clear conclusion on whether to handle it type/bug Type: something is unexpected
Milestone

Comments

@nevermore3
Copy link
Contributor

No description provided.

@CPWstatic CPWstatic transferred this issue from vesoft-inc/nebula-storage Aug 28, 2021
@CPWstatic CPWstatic added the type/bug Type: something is unexpected label Aug 28, 2021
@CPWstatic
Copy link
Contributor

This will be fixed by our september version.

@CPWstatic CPWstatic added this to the v2.6.0 milestone Aug 30, 2021
@critical27
Copy link
Contributor

Which one...

@Sophie-Xie
Copy link
Contributor

Which one...

@nevermore3 pls confirm the question.

@nevermore3
Copy link
Contributor Author

When there are only vertices and no edges, the filtering of vertices is invalid。
It seems to be related to the execution plan

@critical27
Copy link
Contributor

@bright-starry-sky has confirmed with @CPWstatic , this is reasonable, because the filter in go only works when edges are valid.

@critical27 critical27 removed this from the v2.6.0 milestone Sep 27, 2021
@critical27
Copy link
Contributor

critical27 commented Sep 27, 2021

This is because go requires dst as a implicit field, and that's why we need a hash join node in storage.
We need to wait all interfaces are explicitly specified, everything will be ok then.

@bright-starry-sky
Copy link
Contributor

bright-starry-sky commented Sep 27, 2021

Close this issue. After offline discussion with @CPWstatic , the result is expect.

CREATE SPACE test (partition_num=1,replica_factor=1, vid_type=fixed_string(30));
USE test;
create tag st1(c1 string)
create edge se1(c1 string)
create edge se2(c1 string)

insert edge se1(c1) values "1" -> "2"@0:("row"), "1" -> "3"@0:("row")
insert vertex st1(c1) values "1":("row"), "2":("row"), "3":("row")


(root@nebula) [test]> go from "1" over se2 where $$.st1.c1 == "row"
+----------+
| se2._dst |
+----------+
+----------+
Empty set (time spent 7382/7947 us)

Tue, 31 Aug 2021 13:27:15 CST

(root@nebula) [test]> 

(root@nebula) [test]> go from "1" over se1 where $$.st1.c1 == "row"
+----------+
| se1._dst |
+----------+
| "2"      |
+----------+
| "3"      |
+----------+
Got 2 rows (time spent 12583/13348 us)

Tue, 31 Aug 2021 13:27:35 CST

(root@nebula) [test]> go from "1" over * where $$.st1.c1 == "row"
+----------+----------+
| se1._dst | se2._dst |
+----------+----------+
| "2"      |          |
+----------+----------+
| "3"      |          |
+----------+----------+
Got 2 rows (time spent 10977/11707 us)

Tue, 31 Aug 2021 13:27:44 CST

(root@nebula) [test]> `

`Execution Plan (optimize time 703 us)

-----+--------------+--------------+------------------------------------------------------------+-----------------------------
| id | name         | dependencies | profiling data                                             | operator info              |
-----+--------------+--------------+------------------------------------------------------------+-----------------------------
|  3 | Project      | 4            | ver: 0, rows: 2, execTime: 137us, totalTime: 148us         | outputVar: [               |
|    |              |              |                                                            |   {                        |
|    |              |              |                                                            |     "colNames": [          |
|    |              |              |                                                            |       "se1._dst"           |
|    |              |              |                                                            |     ],                     |
|    |              |              |                                                            |     "type": "DATASET",     |
|    |              |              |                                                            |     "name": "__Project_3"  |
|    |              |              |                                                            |   }                        |
|    |              |              |                                                            | ]                          |
|    |              |              |                                                            | inputVar: __Filter_2       |
|    |              |              |                                                            | columns: [                 |
|    |              |              |                                                            |   "se1._dst"               |
|    |              |              |                                                            | ]                          |
-----+--------------+--------------+------------------------------------------------------------+-----------------------------
|  4 | GetNeighbors | 0            | {                                                          | outputVar: [               |
|    |              |              | ver: 0, rows: 0, execTime: 194us, totalTime: 129357us      |   {                        |
|    |              |              | "127.0.0.1":3779 exec/total/vertices: 642(us)/65814(us)/1, |     "colNames": [],        |
|    |              |              | total_rpc_time: 129096(us)                                 |     "type": "DATASET",     |
|    |              |              | }                                                          |     "name": "__Filter_2"   |
|    |              |              |                                                            |   }                        |
|    |              |              |                                                            | ]                          |
|    |              |              |                                                            | inputVar: __VAR_0          |
|    |              |              |                                                            | space: 3                   |
|    |              |              |                                                            | dedup: false               |
|    |              |              |                                                            | limit: -1                  |
|    |              |              |                                                            | filter: ($^.st1.c1=="row") |
|    |              |              |                                                            | orderBy: []                |
|    |              |              |                                                            | src: COLUMN[0]             |
|    |              |              |                                                            | edgeTypes: []              |
|    |              |              |                                                            | edgeDirection: OUT_EDGE    |
|    |              |              |                                                            | vertexProps: [             |
|    |              |              |                                                            |   {                        |
|    |              |              |                                                            |     "tagId": 4,            |
|    |              |              |                                                            |     "props": [             |
|    |              |              |                                                            |       "c1"                 |
|    |              |              |                                                            |     ]                      |
|    |              |              |                                                            |   }                        |
|    |              |              |                                                            | ]                          |
|    |              |              |                                                            | edgeProps: [               |
|    |              |              |                                                            |   {                        |
|    |              |              |                                                            |     "type": "5",           |
|    |              |              |                                                            |     "props": [             |
|    |              |              |                                                            |       "_dst"               |
|    |              |              |                                                            |     ]                      |
|    |              |              |                                                            |   }                        |
|    |              |              |                                                            | ]                          |
|    |              |              |                                                            | statProps:                 |
|    |              |              |                                                            | exprs:                     |
|    |              |              |                                                            | random: false              |
-----+--------------+--------------+------------------------------------------------------------+-----------------------------
|  0 | Start        |              | ver: 0, rows: 0, execTime: 4us, totalTime: 55us            | outputVar: [               |
|    |              |              |                                                            |   {                        |
|    |              |              |                                                            |     "colNames": [],        |
|    |              |              |                                                            |     "name": "__Start_0",   |
|    |              |              |                                                            |     "type": "DATASET"      |
|    |              |              |                                                            |   }                        |
|    |              |              |                                                            | ]                          |
-----+--------------+--------------+------------------------------------------------------------+-----------------------------

Tue, 31 Aug 2021 13:45:28 CST

@Sophie-Xie Sophie-Xie reopened this Sep 28, 2021
@Sophie-Xie Sophie-Xie modified the milestones: v2.7.0, v3.0.0 Oct 9, 2021
@Sophie-Xie Sophie-Xie assigned liuyu85cn and unassigned critical27 Dec 15, 2021
@Sophie-Xie Sophie-Xie added the need to discuss Solution: issue or PR without a clear conclusion on whether to handle it label Jan 4, 2022
@critical27
Copy link
Contributor

Fixed in #3458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need to discuss Solution: issue or PR without a clear conclusion on whether to handle it type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

6 participants