From f783f7a08eec974a3751f0e4ef955b2d1d3a2d5d Mon Sep 17 00:00:00 2001 From: "xunalei.lin" Date: Mon, 22 Jul 2024 07:27:48 +0000 Subject: [PATCH 1/2] [ALGOS-266] feat(algos): Fix bugs for template query; --- GDBMS_ALGO/community/label_prop.gsql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GDBMS_ALGO/community/label_prop.gsql b/GDBMS_ALGO/community/label_prop.gsql index 7e243325..6be6c654 100644 --- a/GDBMS_ALGO/community/label_prop.gsql +++ b/GDBMS_ALGO/community/label_prop.gsql @@ -8,7 +8,7 @@ CREATE TEMPLATE QUERY GDBMS_ALGO.community.label_prop( BOOL print_results = TRUE, STRING result_attribute = "", STRING file_path="" -) FOR GRAPH MyGraph SYNTAX V1 { +) SYNTAX V1 { /* First Author: xuanlei.lin@tigergraph.com @@ -171,7 +171,8 @@ CREATE TEMPLATE QUERY GDBMS_ALGO.community.label_prop( END, IF file_path != "" THEN IF v_type_set.size() == 1 THEN - f.println(s.id, s.@community_id) + VERTEX node = s.@community_id, + f.println(s, node) ELSE VERTEX node = s.@community_id, f.println(s.type, s, node.type, node) From 884833d0ed3ba5df8d5aad6fc90d1ec35905452a Mon Sep 17 00:00:00 2001 From: "xunalei.lin" Date: Mon, 22 Jul 2024 12:08:44 +0000 Subject: [PATCH 2/2] [ALGOS-266] feat(algos): Fix bugs for template query; --- GDBMS_ALGO/community/label_prop.gsql | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/GDBMS_ALGO/community/label_prop.gsql b/GDBMS_ALGO/community/label_prop.gsql index 6be6c654..779adee0 100644 --- a/GDBMS_ALGO/community/label_prop.gsql +++ b/GDBMS_ALGO/community/label_prop.gsql @@ -170,13 +170,8 @@ CREATE TEMPLATE QUERY GDBMS_ALGO.community.label_prop( @@comm_sizes_map += (s.@community_id -> 1) END, IF file_path != "" THEN - IF v_type_set.size() == 1 THEN - VERTEX node = s.@community_id, - f.println(s, node) - ELSE - VERTEX node = s.@community_id, - f.println(s.type, s, node.type, node) - END + VERTEX node = s.@community_id, + f.println(s.type, s, node.type, node) END LIMIT print_limit;