Skip to content

Commit

Permalink
[DD && WPDD][Docqueries] New results on queries for the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Sep 8, 2023
1 parent 4337579 commit b79dd62
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 69 deletions.
6 changes: 2 additions & 4 deletions docqueries/driving_distance/dijksraDD-issue729.result
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FROM
GROUP BY start_vid) AS count
WHERE edge_table.source=count.start_vid
;
UPDATE 16
UPDATE 18
ALTER TABLE edges
DROP COLUMN IF EXISTS another_column,
ADD COLUMN another_column INTEGER;
Expand Down Expand Up @@ -61,9 +61,7 @@ FROM
GROUP BY start_vid) AS count
WHERE network.source=count.start_vid
;
NOTICE:
No return values were found
UPDATE 0
UPDATE 4
ALTER TABLE network
DROP COLUMN IF EXISTS another_column,
ADD COLUMN another_column INTEGER;
Expand Down
2 changes: 1 addition & 1 deletion docqueries/driving_distance/pgr_drivingDistance.result
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SELECT * FROM pgr_drivingDistance(
21 | 3 | 16 | 3 | 7 | 1 | 3
22 | 3 | 16 | 6 | 4 | 1 | 3
23 | 3 | 16 | 8 | 10 | 1 | 3
(23 rows)
(23 rows)

/* --q15 */
ROLLBACK;
Expand Down
60 changes: 33 additions & 27 deletions docqueries/src/migration.result
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,14 @@ WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,b
-----+------+------+------+----------
1 | -1 | -1 | 0 | 0
2 | 5 | 1 | 0.4 | 0.4
3 | 6 | 1 | 1 | 1.4
4 | 7 | 4 | 1 | 2.4
(4 rows)
3 | 6 | 1 | 0.6 | 0.6
4 | 7 | 4 | 1 | 1.6
5 | 3 | 7 | 1 | 2.6
6 | 8 | 10 | 1 | 2.6
7 | 11 | 8 | 1 | 2.6
8 | -3 | 12 | 0.6 | 3.2
9 | -4 | 6 | 0.7 | 3.3
(9 rows)

/* --withpointsdd2 */
SELECT * FROM pgr_withPointsDD(
Expand All @@ -817,34 +822,33 @@ WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,b
SELECT * FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
-1, 3.3, directed => false, driving_side => 'r');
-1, 3.3, directed => true, driving_side => 'b');
WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) is been deprecated
seq | node | edge | cost | agg_cost
-----+------+------+------+----------
1 | -1 | -1 | 0 | 0
2 | 5 | 1 | 0.4 | 0.4
3 | 6 | 1 | 0.6 | 0.6
4 | 7 | 4 | 1 | 1.6
5 | 10 | 2 | 1 | 1.6
6 | 3 | 7 | 1 | 2.6
7 | 8 | 10 | 1 | 2.6
8 | 11 | 8 | 1 | 2.6
9 | 15 | 3 | 1 | 2.6
5 | 3 | 7 | 1 | 2.6
6 | 8 | 10 | 1 | 2.6
7 | 11 | 8 | 1 | 2.6
8 | -3 | 12 | 0.6 | 3.2
9 | -4 | 6 | 0.7 | 3.3
(9 rows)

/* --withpointsdd4 */
SELECT * FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
-1, 3.3, 'r', details => true);
-1, 3.3, 'r', directed => true);
seq | depth | start_vid | node | edge | cost | agg_cost
-----+-------+-----------+------+------+------+----------
1 | 0 | -1 | -1 | -1 | 0 | 0
2 | 1 | -1 | 5 | 1 | 0.4 | 0.4
3 | 2 | -1 | 6 | 1 | 1 | 1.4
4 | 3 | -1 | -6 | 4 | 0.7 | 2.1
5 | 4 | -1 | 7 | 4 | 0.3 | 2.4
(5 rows)
4 | 3 | -1 | 7 | 4 | 1 | 2.4
(4 rows)

/* --withpointsdd5 */
SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD(
Expand Down Expand Up @@ -873,19 +877,21 @@ SELECT * FROM pgr_withPointsDD(
4 | 2 | -1 | 5 | 1 | 1 | 1.6
5 | 3 | -1 | 3 | 7 | 1 | 2.6
6 | 3 | -1 | 8 | 10 | 1 | 2.6
7 | 0 | 16 | 16 | -1 | 0 | 0
8 | 1 | 16 | 11 | 9 | 1 | 1
9 | 1 | 16 | 15 | 16 | 1 | 1
10 | 1 | 16 | 17 | 15 | 1 | 1
11 | 2 | 16 | 10 | 3 | 1 | 2
12 | 2 | 16 | 12 | 11 | 1 | 2
(12 rows)
7 | 4 | -1 | -3 | 12 | 0.6 | 3.2
8 | 4 | -1 | -4 | 6 | 0.7 | 3.3
9 | 0 | 16 | 16 | -1 | 0 | 0
10 | 1 | 16 | 11 | 9 | 1 | 1
11 | 1 | 16 | 15 | 16 | 1 | 1
12 | 1 | 16 | 17 | 15 | 1 | 1
13 | 2 | 16 | 10 | 3 | 1 | 2
14 | 2 | 16 | 12 | 11 | 1 | 2
(14 rows)

/* --withpointsdd7 */
SELECT seq, start_vid, node, edge, cost, agg_cost FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
ARRAY[-1, 16], 3.3, 'l', equicost => true);
ARRAY[-1, 16], 3.3, 'l', equicost => true) WHERE node >= 0 OR cost = 0;
seq | start_vid | node | edge | cost | agg_cost
-----+-----------+------+------+------+----------
1 | -1 | -1 | -1 | 0 | 0
Expand All @@ -894,12 +900,12 @@ SELECT seq, start_vid, node, edge, cost, agg_cost FROM pgr_withPointsDD(
4 | -1 | 5 | 1 | 1 | 1.6
5 | -1 | 3 | 7 | 1 | 2.6
6 | -1 | 8 | 10 | 1 | 2.6
7 | 16 | 16 | -1 | 0 | 0
8 | 16 | 11 | 9 | 1 | 1
9 | 16 | 15 | 16 | 1 | 1
10 | 16 | 17 | 15 | 1 | 1
11 | 16 | 10 | 3 | 1 | 2
12 | 16 | 12 | 11 | 1 | 2
9 | 16 | 16 | -1 | 0 | 0
10 | 16 | 11 | 9 | 1 | 1
11 | 16 | 15 | 16 | 1 | 1
12 | 16 | 17 | 15 | 1 | 1
13 | 16 | 10 | 3 | 1 | 2
14 | 16 | 12 | 11 | 1 | 2
(12 rows)

/* --withpointsdd8 */
Expand Down
6 changes: 3 additions & 3 deletions docqueries/src/migration.test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ SELECT * FROM pgr_withPointsDD(
SELECT * FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
-1, 3.3, directed => false, driving_side => 'r');
-1, 3.3, directed => true, driving_side => 'b');
/* --withpointsdd4 */
SELECT * FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
-1, 3.3, 'r', details => true);
-1, 3.3, 'r', directed => true);
/* --withpointsdd5 */
SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
Expand All @@ -295,7 +295,7 @@ SELECT * FROM pgr_withPointsDD(
SELECT seq, start_vid, node, edge, cost, agg_cost FROM pgr_withPointsDD(
$$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
ARRAY[-1, 16], 3.3, 'l', equicost => true);
ARRAY[-1, 16], 3.3, 'l', equicost => true) WHERE node >= 0 OR cost = 0;
/* --withpointsdd8 */
/* --withPointsKSP1 */
SELECT * FROM pgr_withPointsKSP(
Expand Down
70 changes: 36 additions & 34 deletions docqueries/withPoints/doc-pgr_withPointsDD.result
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ SELECT * FROM pgr_withPointsDD(
4 | 2 | -1 | 5 | 1 | 1 | 1.6
5 | 3 | -1 | 3 | 7 | 1 | 2.6
6 | 3 | -1 | 8 | 10 | 1 | 2.6
7 | 0 | 16 | 16 | -1 | 0 | 0
8 | 1 | 16 | 11 | 9 | 1 | 1
9 | 1 | 16 | 15 | 16 | 1 | 1
10 | 1 | 16 | 17 | 15 | 1 | 1
11 | 2 | 16 | 10 | 3 | 1 | 2
12 | 2 | 16 | 12 | 11 | 1 | 2
(12 rows)
7 | 4 | -1 | -3 | 12 | 0.6 | 3.2
8 | 4 | -1 | -4 | 6 | 0.7 | 3.3
9 | 0 | 16 | 16 | -1 | 0 | 0
10 | 1 | 16 | 11 | 9 | 1 | 1
11 | 1 | 16 | 15 | 16 | 1 | 1
12 | 1 | 16 | 17 | 15 | 1 | 1
13 | 2 | 16 | 10 | 3 | 1 | 2
14 | 2 | 16 | 12 | 11 | 1 | 2
(14 rows)

/* -- q4 */
SELECT * FROM pgr_withPointsDD(
Expand All @@ -54,13 +56,13 @@ SELECT * FROM pgr_withPointsDD(
2 | 1 | -1 | 5 | 1 | 0.4 | 0.4
3 | 1 | -1 | 6 | 1 | 0.6 | 0.6
4 | 2 | -1 | -6 | 4 | 0.7 | 1.3
5 | 3 | -1 | 7 | 4 | 0.3 | 1.6
6 | 2 | -1 | 10 | 2 | 1 | 1.6
5 | 2 | -1 | 10 | 2 | 1 | 1.6
6 | 3 | -1 | 7 | 4 | 0.3 | 1.6
7 | 3 | -1 | -5 | 5 | 0.8 | 2.4
8 | 4 | -1 | 3 | 7 | 1 | 2.6
9 | 4 | -1 | 8 | 10 | 1 | 2.6
10 | 4 | -1 | 11 | 8 | 1 | 2.6
11 | 3 | -1 | 15 | 3 | 1 | 2.6
8 | 3 | -1 | 15 | 3 | 1 | 2.6
9 | 4 | -1 | 3 | 7 | 1 | 2.6
10 | 4 | -1 | 8 | 10 | 1 | 2.6
11 | 4 | -1 | 11 | 8 | 1 | 2.6
12 | 5 | -1 | -3 | 12 | 0.6 | 3.2
13 | 5 | -1 | -4 | 6 | 0.7 | 3.3
(13 rows)
Expand All @@ -78,27 +80,27 @@ SELECT * FROM pgr_withPointsDD(
details => true);
seq | depth | start_vid | node | edge | cost | agg_cost
-----+-------+-----------+------+------+------+----------
1 | 0 | -1 | -1 | -1 | 0 | 0
2 | 1 | -1 | 11 | 5 | 0.2 | 0.2
3 | 2 | -1 | 7 | 8 | 1 | 1.2
4 | 2 | -1 | 12 | 11 | 1 | 1.2
5 | 2 | -1 | 16 | 9 | 1 | 1.2
6 | 3 | -1 | -2 | 8 | 0.9 | 2.1
7 | 3 | -1 | 3 | 7 | 1 | 2.2
8 | 3 | -1 | 6 | 4 | 1 | 2.2
9 | 3 | -1 | 8 | 10 | 1 | 2.2
10 | 3 | -1 | 15 | 16 | 1 | 2.2
11 | 3 | -1 | 17 | 13 | 1 | 2.2
12 | 0 | -2 | -2 | -1 | 0 | 0
13 | 1 | -2 | 11 | 8 | 0.1 | 0.1
14 | 2 | -2 | 7 | 8 | 1 | 1.1
15 | 2 | -2 | 12 | 11 | 1 | 1.1
16 | 2 | -2 | 16 | 9 | 1 | 1.1
17 | 3 | -2 | 3 | 7 | 1 | 2.1
18 | 3 | -2 | 6 | 4 | 1 | 2.1
19 | 3 | -2 | 8 | 10 | 1 | 2.1
20 | 3 | -2 | 15 | 16 | 1 | 2.1
21 | 3 | -2 | 17 | 13 | 1 | 2.1
1 | 0 | -2 | -2 | -1 | 0 | 0
2 | 1 | -2 | 11 | 8 | 0.1 | 0.1
3 | 2 | -2 | 16 | 9 | 1 | 1.1
4 | 2 | -2 | 7 | 8 | 1 | 1.1
5 | 2 | -2 | 12 | 11 | 1 | 1.1
6 | 3 | -2 | 17 | 13 | 1 | 2.1
7 | 3 | -2 | 15 | 16 | 1 | 2.1
8 | 3 | -2 | 8 | 10 | 1 | 2.1
9 | 3 | -2 | 6 | 4 | 1 | 2.1
10 | 3 | -2 | 3 | 7 | 1 | 2.1
11 | 0 | -1 | -1 | -1 | 0 | 0
12 | 1 | -1 | 11 | 5 | 0.2 | 0.2
13 | 2 | -1 | 7 | 8 | 1 | 1.2
14 | 2 | -1 | 12 | 11 | 1 | 1.2
15 | 2 | -1 | 16 | 9 | 1 | 1.2
16 | 3 | -1 | -2 | 8 | 0.9 | 2.1
17 | 3 | -1 | 17 | 13 | 1 | 2.2
18 | 3 | -1 | 15 | 16 | 1 | 2.2
19 | 3 | -1 | 8 | 10 | 1 | 2.2
20 | 3 | -1 | 6 | 4 | 1 | 2.2
21 | 3 | -1 | 3 | 7 | 1 | 2.2
(21 rows)

/* -- q6 */
Expand Down

0 comments on commit b79dd62

Please sign in to comment.