Commit 0b869814 authored by Igor Babaev's avatar Igor Babaev

Made the result output deterministic.

parent 68e7d92c
......@@ -1911,8 +1911,8 @@ a b distance path_string
2 6 4 2.1.3.5.6.
2 7 2 2.4.7.
2 7 4 2.1.3.4.7.
3 1 2 3.6.1.
3 1 2 3.5.1.
3 1 2 3.6.1.
3 1 3 3.5.6.1.
3 4 1 3.4.
3 5 1 3.5.
......
......@@ -1409,6 +1409,7 @@ DROP TABLE IF EXISTS edges2;
CREATE VIEW edges2 (a, b) AS
SELECT a, b FROM edges UNION ALL SELECT b, a FROM edges;
--sorted_result
WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS
( SELECT a, b, 1 AS distance,
concat(a, '.', b, '.') AS path_string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment