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

WHERE count(v) will crash #3269

Closed
wey-gu opened this issue Nov 4, 2021 · 2 comments
Closed

WHERE count(v) will crash #3269

wey-gu opened this issue Nov 4, 2021 · 2 comments
Labels
type/bug Type: something is unexpected

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Nov 4, 2021

Should this be supported or? It will now crash the server-side.

MATCH (v:player)-[e:follow]->(v1:player) WHERE count(v) > 2 WITH id(v) as src, count(v) as count RETURN src
@wey-gu wey-gu added the type/enhancement Type: make the code neat or more efficient label Nov 4, 2021
@Sophie-Xie
Copy link
Contributor

Sophie-Xie commented Nov 4, 2021

in v2.6.0 there is no crash.

(root@nebula) [basketballplayer]> MATCH (v:player)-[e:follow]->(v1:player) WHERE count(v) > 2 WITH id(v) as src, count(v) as count RETURN src
[ERROR (-1004)]: SyntaxError: Invalid use of aggregating function in this context. near `WHERE count(v) > 2'

Thu, 04 Nov 2021 08:44:24 UTC

(root@nebula) [basketballplayer]> show hosts graph

+-------------+------+----------+---------+--------------+---------+
| Host        | Port | Status   | Role    | Git Info Sha | Version |
+-------------+------+----------+---------+--------------+---------+
| "127.0.0.1" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd"    | "2.6.0" |
+-------------+------+----------+---------+--------------+---------+
Got 1 rows (time spent 1151/1901 us)

Thu, 04 Nov 2021 08:44:51 UTC

@Sophie-Xie Sophie-Xie added type/bug Type: something is unexpected and removed type/enhancement Type: make the code neat or more efficient labels Nov 4, 2021
@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 10, 2021

closing it as it's realized as invalid instead of crashing the server-side.

(root@nebula) [basketballplayer]> show hosts storage
+-------------+------+----------+-----------+--------------+----------------------+
| Host        | Port | Status   | Role      | Git Info Sha | Version              |
+-------------+------+----------+-----------+--------------+----------------------+
| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "07ccfde"    | "2021.11.03-nightly" |
| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "07ccfde"    | "2021.11.03-nightly" |
| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "07ccfde"    | "2021.11.03-nightly" |
+-------------+------+----------+-----------+--------------+----------------------+
Got 3 rows (time spent 962/2582 us)

Wed, 10 Nov 2021 04:28:32 UTC

(root@nebula) [basketballplayer]> MATCH (v:player)-[e:follow]->(v1:player) WHERE count(v) > 2 WITH id(v) as src, count(v) as count RETURN src
[ERROR (-1004)]: SyntaxError: Invalid use of aggregating function in this context. near `WHERE count(v) > 2'

Wed, 10 Nov 2021 04:28:40 UTC

(root@nebula) [basketballplayer]>

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

2 participants