Skip to content

Commit d5c1d9d

Browse files
committed
[ALGOS-266] feat(algos): print to file with vertex type if there're multiple vertex types.
1 parent bbcf2dc commit d5c1d9d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

GDBMS_ALGO/community/label_prop.gsql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CREATE TEMPLATE QUERY GDBMS_ALGO.community.label_prop(
1515
First Commit Date: 2024-07-15
1616

1717
Recent Author: xuanlei.lin@tigergraph.com
18-
Recent Commit Date: 2024-07-15
18+
Recent Commit Date: 2024-07-16
1919

2020
Repository:
2121
https://github.com/tigergraph/gsql-graph-algorithms/tree/master/algorithms/Community
@@ -170,7 +170,12 @@ CREATE TEMPLATE QUERY GDBMS_ALGO.community.label_prop(
170170
@@comm_sizes_map += (s.@community_id -> 1)
171171
END,
172172
IF file_path != "" THEN
173-
f.println(s.id, s.@community_id)
173+
IF v_type_set.size() == 1 THEN
174+
f.println(s.id, s.@community_id)
175+
ELSE
176+
VERTEX node = s.@community_id,
177+
f.println(s.type, s, node.type, node)
178+
END
174179
END
175180
LIMIT print_limit;
176181

0 commit comments

Comments
 (0)