kyle
2021 年9 月 7 日 09:20
21
简化一下表达式先把聚合函数去掉测一下
go 1 to 2 STEPS from “UR2712823947216322560” over e_call BIDIRECT where $$.user.user_no!=‘UR2712823947216322560’ yield distinct $$.user.user_no as userNo,$$.user.date_appl_submit as dateApplSubmit | limit 500 | yield $-.dateApplSubmit > 0
1 个赞
Anyzm
2021 年9 月 7 日 09:24
22
(root@nebula) [social_book]> go 1 to 2 STEPS from "UR2712823947216322560" over e_call BIDIRECT where $$.user.user_no!='UR2712823947216322560' yield distinct $$.user.user_no as userNo,$$.user.date_appl_submit as dateApplSubmit | limit 500 | yield distinct $-.dateApplSubmit > 0
+-----------------------+
| ($-.dateApplSubmit>0) |
+-----------------------+
| true |
+-----------------------+
| false |
+-----------------------+
| __NULL__ |
+-----------------------+
| |
+-----------------------+
Got 4 rows (time spent 17076/19351 us)
Tue, 07 Sep 2021 17:22:50 CST
Anyzm
2021 年9 月 7 日 09:28
23
true false NULL还能理解,第四种是啥啊
kyle
2021 年9 月 7 日 09:35
24
empty 表示没有这个属性,你的语句里边 e_call 拓展出去有非 user 类型的 tag 就会返回 empty 了。
empty 可以通过 is not empty 过滤掉。
你上面必现的语句 is not null 的地方 and $-.userNo is not empty 测一下
Anyzm
2021 年9 月 7 日 09:40
25
报错了
(root@nebula) [social_book]> go 1 to 2 STEPS from "UR2712823947216322560" over e_call BIDIRECT where $$.user.user_no!='UR2712823947216322560' yield distinct $$.user.user_no as userNo,$$.user.date_appl_submit as dateApplSubmit | limit 500 | yield count(case when $-.dateApplSubmit is not null and $-.dateApplSubmit is not empty and $-.dateApplSubmit>0 then true end)
[ERROR (-7)]: SyntaxError: syntax error near `is'
Tue, 07 Sep 2021 17:39:07 CST
kyle
2021 年9 月 7 日 09:54
27
执行一下这五条语句:
show configs;
show hosts;
show hosts graph;
show hosts storage;
show hosts meta;
Anyzm
2021 年9 月 7 日 09:59
28
kyle:
这个
(root@nebula) [social_book]> show tags
+--------+
| Name |
+--------+
| "user" |
+--------+
Got 1 rows (time spent 15092/16949 us)
Tue, 07 Sep 2021 17:49:04 CST
这个空间下只有这一个TAG啊,所以理论上不应该存在关联了非user的TAG
我理解的是:可能边存在,但是边对应的顶点不存在(没有关联任何TAG),所以出现了这样的问题
Anyzm
2021 年9 月 7 日 10:02
29
kyle:
show configs;
(root@nebula) [social_book]> show configs;
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| module | name | type | mode | value |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "v" | "int" | "MUTABLE" | 0 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "minloglevel" | "int" | "MUTABLE" | 0 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "slow_op_threshhold_ms" | "int" | "MUTABLE" | 50 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "accept_partial_success" | "bool" | "MUTABLE" | false |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "heartbeat_interval_secs" | "int" | "MUTABLE" | 10 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "GRAPH" | "meta_client_retry_times" | "int" | "MUTABLE" | 3 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "v" | "int" | "MUTABLE" | 0 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "wal_ttl" | "int" | "MUTABLE" | 14400 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "minloglevel" | "int" | "MUTABLE" | 0 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "rocksdb_db_options" | "map" | "MUTABLE" | {} |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "slow_op_threshhold_ms" | "int" | "MUTABLE" | 50 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "clean_wal_interval_secs" | "int" | "MUTABLE" | 600 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "heartbeat_interval_secs" | "int" | "MUTABLE" | 10 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "meta_client_retry_times" | "int" | "MUTABLE" | 3 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "custom_filter_interval_secs" | "int" | "MUTABLE" | 86400 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "max_edge_returned_per_vertex" | "int" | "MUTABLE" | 2147483647 |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "rocksdb_column_family_options" | "map" | "MUTABLE" | {disable_auto_compactions: false} |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
| "STORAGE" | "rocksdb_block_based_table_options" | "map" | "MUTABLE" | {block_size: "8192"} |
+-----------+-------------------------------------+--------+-----------+-----------------------------------+
Got 18 rows (time spent 1169/3109 us)
Tue, 07 Sep 2021 17:58:24 CST
(root@nebula) [social_book]> show hosts;
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution |
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
| "10.208.68.159" | 9779 | "ONLINE" | 27 | "lingxi_arch:5, social_book:22" | "lingxi_arch:15, social_book:64" |
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
| "10.208.68.176" | 9779 | "ONLINE" | 26 | "lingxi_arch:5, social_book:21" | "lingxi_arch:15, social_book:64" |
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
| "10.208.68.177" | 9779 | "ONLINE" | 26 | "lingxi_arch:5, social_book:21" | "lingxi_arch:15, social_book:64" |
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
| "Total" | | | 79 | "lingxi_arch:15, social_book:64" | "lingxi_arch:45, social_book:192" |
+-----------------+------+----------+--------------+----------------------------------+-----------------------------------+
Got 4 rows (time spent 2185/4905 us)
(root@nebula) [social_book]> show hosts graph;
+-----------------+------+----------+---------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-----------------+------+----------+---------+--------------+
| "10.208.68.159" | 9669 | "ONLINE" | "GRAPH" | "b4f6f0a" |
+-----------------+------+----------+---------+--------------+
| "10.208.68.176" | 9669 | "ONLINE" | "GRAPH" | "b4f6f0a" |
+-----------------+------+----------+---------+--------------+
| "10.208.68.177" | 9669 | "ONLINE" | "GRAPH" | "b4f6f0a" |
+-----------------+------+----------+---------+--------------+
Got 3 rows (time spent 494/2294 us)
Tue, 07 Sep 2021 17:59:41 CST
(root@nebula) [social_book]> show hosts storage;
+-----------------+------+----------+-----------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-----------------+------+----------+-----------+--------------+
| "10.208.68.159" | 9779 | "ONLINE" | "STORAGE" | "6ed8590" |
+-----------------+------+----------+-----------+--------------+
| "10.208.68.176" | 9779 | "ONLINE" | "STORAGE" | "6ed8590" |
+-----------------+------+----------+-----------+--------------+
| "10.208.68.177" | 9779 | "ONLINE" | "STORAGE" | "6ed8590" |
+-----------------+------+----------+-----------+--------------+
Got 3 rows (time spent 487/2338 us)
Tue, 07 Sep 2021 18:00:04 CST
(root@nebula) [social_book]> show hosts meta;
+-----------------+------+----------+--------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-----------------+------+----------+--------+--------------+
| "10.208.68.176" | 9559 | "ONLINE" | "META" | "6ed8590" |
+-----------------+------+----------+--------+--------------+
| "10.208.68.159" | 9559 | "ONLINE" | "META" | "6ed8590" |
+-----------------+------+----------+--------+--------------+
| "10.208.68.177" | 9559 | "ONLINE" | "META" | "6ed8590" |
+-----------------+------+----------+--------+--------------+
Got 3 rows (time spent 4784/6619 us)
Tue, 07 Sep 2021 18:00:34 CST
Anyzm
2021 年9 月 7 日 10:09
30
确实是你说的这个原因导致的
go 1 to 2 STEPS from "UR2712823947216322560" over e_call BIDIRECT where $$.user.user_no is not null and $$.user.user_no!='UR2712823947216322560' yield e_call._dst, $$.user.user_no
当我们这样查询的时候,得出的结果发现,边存在,但对应的顶点不存在(或者说对应的TAG也不存在),但问题是如何解决这个问题呢?is not empty似乎不起作用。
2.0.1 有 bug, is not empty 解析不了,2.5.0 修复了
你可以升级到 2.5.0 再用 is not empty
3 个赞
kyle
2021 年9 月 8 日 06:30
32
4 个赞
system
关闭
2021 年9 月 15 日 06:31
33
此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。