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 Attribute filtering does not support negative numbers #3270

Closed
nevermore3 opened this issue Nov 4, 2021 · 1 comment · Fixed by #3272
Closed

MATCH Attribute filtering does not support negative numbers #3270

nevermore3 opened this issue Nov 4, 2021 · 1 comment · Fixed by #3272
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@nevermore3
Copy link
Contributor

nevermore3 commented Nov 4, 2021

(root@nebula) [nba]> match (v:player {age:30}) return v
+-------------------------------------------------------------------+
| v                                                                 |
+-------------------------------------------------------------------+
| ("DeAndre Jordan" :player{age: 30, name: "DeAndre Jordan"})       |
| ("Blake Griffin" :player{age: 30, name: "Blake Griffin"})         |
| ("Kevin Durant" :player{age: 30, name: "Kevin Durant"})           |
| ("Russell Westbrook" :player{age: 30, name: "Russell Westbrook"}) |
+-------------------------------------------------------------------+

Got 4 rows (time spent 17979/19717 us)

Thu, 04 Nov 2021 11:17:39 CST

(root@nebula) [nba]> match (v:player {age:-10}) return v
[ERROR (-1009)]: SemanticError: Props must be constant: `-(10)'



(root@nebula) [nba]> match (v:player) where v.age == -1 return v
+--------------------------------------------+
| v                                          |
+--------------------------------------------+
| ("Null1" :player{age: -1, name: __NULL__}) |
+--------------------------------------------+

(root@nebula) [nba]> match (v:player {age:+10}) return v
[ERROR (-1009)]: SemanticError: Props must be constant: `+(10)'

@nevermore3 nevermore3 added the type/bug Type: something is unexpected label Nov 4, 2021
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Nov 4, 2021
@Shylock-Hg
Copy link
Contributor

Shylock-Hg commented Nov 4, 2021

In fact, it's evaluable expression instead of constant. e.g. match (v {age: 2 + 23}) return v is valid query too.

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

Successfully merging a pull request may close this issue.

4 participants