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

match statement gets the wrong result in some indexing cases #3715

Closed
czpmango opened this issue Jan 13, 2022 · 0 comments
Closed

match statement gets the wrong result in some indexing cases #3715

czpmango opened this issue Jan 13, 2022 · 0 comments
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@czpmango
Copy link
Contributor

Describe the bug (required)
The Match statement gets the wrong result in some indexing cases.

Your Environments (required)
nebula v3.0.0

How To Reproduce(required)

(root@nebula) [nba]> create tag index player_age_index on player(age)
(root@nebula) [nba]> rebuild tag index player_age_index
(root@nebula) [nba]> show tag indexes
+-----------------------+------------+----------+
| Index Name            | By Tag     | Columns  |
+-----------------------+------------+----------+
| "player_age_index"    | "player"   | ["age"]  |
+-----------------------+------------+----------+
Got 3 rows (time spent 529/833 us)

(root@nebula) [nba]>MATCH (v:player) WHERE v.player.name<="Aron Baynes" or v.player.name>"Yao Ming" or v.player.name=="Kobe Bryant" or v.player.age>40 RETURN count(*)
+----------+
| count(*) |
+----------+
| 56       |
+----------+
Got 1 rows (time spent 11032/11276 us)

(root@nebula) [nba]> create tag index player_name_index on player(name(8))
(root@nebula) [nba]> rebuild tag index player_name_index
(root@nebula) [nba]> show tag indexes
+-----------------------+------------+----------+
| Index Name            | By Tag     | Columns  |
+-----------------------+------------+----------+
| "player_age_index"    | "player"   | ["age"]  |
| "player_name_index"   | "player"   | ["name"] |
+-----------------------+------------+----------+
(root@nebula) [nba]> MATCH (v:player) WHERE v.player.name<="Aron Baynes" or v.player.name>"Yao Ming" or v.player.name=="Kobe Bryant" or v.player.age>40 RETURN count(*)
+----------+
| count(*) |
+----------+
| 11       |
+----------+

Expected behavior
Basic correct result.

Additional context
Reconsider IndexScanRule's pattern-matching or what to do with redundant Filter plannode which already been embeded into IndexScan.

@czpmango czpmango added the type/bug Type: something is unexpected label Jan 13, 2022
@czpmango czpmango mentioned this issue Jan 13, 2022
11 tasks
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Jan 14, 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
Projects
None yet
Development

No branches or pull requests

3 participants