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

Here is some problem in LIMIT in GO #4233

Closed
foesa-yang opened this issue May 6, 2022 · 4 comments
Closed

Here is some problem in LIMIT in GO #4233

foesa-yang opened this issue May 6, 2022 · 4 comments
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@foesa-yang
Copy link

foesa-yang commented May 6, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Your Environments (required)

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

How To Reproduce(required)

Steps to reproduce the behavior:

Expected behavior

 (root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER * YIELD dst(edge) LIMIT [rand32(5),rand32(5),rand32(5)];
+-----------+
| dst(EDGE) |
+-----------+
+-----------+
Empty set (time spent 2329/2746 us)

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER * YIELD dst(edge) LIMIT [3,1,4];
+-----------+
| dst(EDGE) |
+-----------+
+-----------+
Empty set (time spent 2582/2941 us)

Fri, 06 May 2022 07:03:11 UTC

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER *  YIELD dst(edge) LIMIT [3,3,3];
+-------------+
| dst(EDGE)   |
+-------------+
| "team204"   |
| "team215"   |
| "player100" |
+-------------+
Got 3 rows (time spent 2962/3437 us)

Fri, 06 May 2022 07:04:02 UTC

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER * YIELD dst(edge) LIMIT [4,4,4];
+-------------+
| dst(EDGE)   |
+-------------+
| "team204"   |
| "team215"   |
| "player100" |
| "player102" |
+-------------+
Got 4 rows (time spent 2658/3032 us)

Fri, 06 May 2022 07:04:13 UTC

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER *  YIELD dst(edge) LIMIT [5,5,5];
+-------------+
| dst(EDGE)   |
+-------------+
| "team204"   |
| "team215"   |
| "player100" |
| "player102" |
| "player125" |
+-------------+
Got 5 rows (time spent 2838/3314 us)

Fri, 06 May 2022 07:04:20 UTC

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER * YIELD dst(edge) LIMIT [3,1,1];
+-----------+
| dst(EDGE) |
+-----------+
+-----------+
Empty set (time spent 2880/3398 us)

Fri, 06 May 2022 07:22:06 UTC

(root@nebula) [basketballplayer]> GO 3 STEPS FROM "player102" OVER * YIELD dst(edge) LIMIT [3,3,3];
+-------------+
| dst(EDGE)   |
+-------------+
| "team204"   |
| "team215"   |
| "player100" |
+-------------+

Additional context
image

@foesa-yang foesa-yang added the type/bug Type: something is unexpected label May 6, 2022
@Sophie-Xie Sophie-Xie added this to the v3.2.0 milestone May 6, 2022
@nevermore3
Copy link
Contributor

You can try the following example,cross validation

GO FROM "player102" over * YIELD dst(edge) as dst LIMIT [3] | GO FROM $-.dst OVER * YIELD dst(edge) as dst LIMIT [1] | GO FROM $-.dst OVER * YIELD dst(edge)

@foesa-yang
Copy link
Author

foesa-yang commented May 6, 2022

You can try the following example,cross validation

GO FROM "player102" over * YIELD dst(edge) as dst LIMIT [3] | GO FROM $-.dst OVER * YIELD dst(edge) as dst LIMIT [1] | GO FROM $-.dst OVER * YIELD dst(edge)

(root@nebula) [basketballplayer]> GO FROM "player102" over * YIELD dst(edge) as dst LIMIT [3] | GO FROM $-.dst OVER * YIELD dst(edge) as dst LIMIT [1] | GO FROM $-.dst OVER * YIELD dst(edge)
+-----------+
| dst(EDGE) |
+-----------+
+-----------+
Empty set (time spent 5246/6589 us)

@nevermore3
Copy link
Contributor

This is expected。 because the vid of the second step has not outing edge

@foesa-yang
Copy link
Author

I've modified documents in the follwing pr.
vesoft-inc/nebula-docs-cn#1771
vesoft-inc/nebula-docs#1332

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

4 participants