vesoft-inc / nebula

A distributed, fast open-source graph database featuring horizontal scalability and high availability
https://nebula-graph.io
Apache License 2.0
10.89k stars 1.21k forks source link

Could not yield variable results now #2633

Open yixinglu opened 3 years ago

yixinglu commented 3 years ago

YIELD

(root@nebula) [nba]> go from "Tim Duncan" Over like where like.likeness > 90 yield $$.player.name;
+-----------------+
| $$.player.name  |
+-----------------+
| "Manu Ginobili" |
+-----------------+
| "Tony Parker"   |
+-----------------+
Got 2 rows (time spent 6663/7014 us)

Wed, 14 Jul 2021 15:40:02 CST

(root@nebula) [nba]> $var = go from "Tim Duncan" Over like where like.likeness > 90 yield $$.player.name; yield $var;

+------+
| $var |
+------+
|      |
+------+
Got 1 rows (time spent 7044/7380 us)

Wed, 14 Jul 2021 15:39:41 CST

WITH

(root@nebula) [nba]> go from "Tim Duncan" Over like where like.likeness > 90 yield $$.player.name AS names | with collect($-.names) as v return v;
+----------------------------------+
| v                                |
+----------------------------------+
| ["Manu Ginobili", "Tony Parker"] |
+----------------------------------+
Got 1 rows (time spent 5984/6363 us)

Wed, 14 Jul 2021 15:42:21 CST

(root@nebula) [nba]> $var = go from "Tim Duncan" Over like where like.likeness > 90 yield $$.player.name; with collect($var) as v return v;
+----+
| v  |
+----+
| [] |
+----+
Got 1 rows (time spent 8720/9189 us)

Wed, 14 Jul 2021 15:41:52 CST
Shylock-Hg commented 3 years ago

The input of match should disabled in vesoft-inc/nebula-graph#1196

Shylock-Hg commented 3 years ago

Yield variable should be disabled too. In above, the result contains the dataset, but console don't display the dataset in cell.