Skip to content

Commit

Permalink
Add extra_float_digits = 2 for epochprop and bounding_box_gist tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitcpp committed Mar 18, 2024
1 parent d9d5461 commit 7b3b114
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 282 deletions.
37 changes: 19 additions & 18 deletions expected/bounding_box_gist.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SET extra_float_digits = 2;
SET enable_seqscan=true;
CREATE TABLE bbox_ellipse (e sellipse not null);
INSERT INTO bbox_ellipse VALUES ('<{10d, 0.1d}, (0d,0d), 0d>');
Expand All @@ -20,19 +21,19 @@ SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' @ e;
QUERY PLAN
----------------------------------------------------------
QUERY PLAN
------------------------------------------------------------
Aggregate
-> Seq Scan on bbox_ellipse
Filter: ('(0.0872664625997165 , 0)'::spoint @ e)
Filter: ('(0.087266462599716474 , 0)'::spoint @ e)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
QUERY PLAN
-----------------------------------------------------------
QUERY PLAN
-------------------------------------------------------------
Aggregate
-> Seq Scan on bbox_ellipse
Filter: ('(0.0872664625997165 , 0)'::spoint <@ e)
Filter: ('(0.087266462599716474 , 0)'::spoint <@ e)
(3 rows)

-- The ellipse has semi-major axis length of 10 degrees along the equator,
Expand All @@ -53,19 +54,19 @@ SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' @ e;
QUERY PLAN
--------------------------------------------------------------
QUERY PLAN
----------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_ellipse on bbox_ellipse
Index Cond: ('(0.0872664625997165 , 0)'::spoint @ e)
Index Cond: ('(0.087266462599716474 , 0)'::spoint @ e)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
QUERY PLAN
---------------------------------------------------------------
QUERY PLAN
-----------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_ellipse on bbox_ellipse
Index Cond: ('(0.0872664625997165 , 0)'::spoint <@ e)
Index Cond: ('(0.087266462599716474 , 0)'::spoint <@ e)
(3 rows)

SET enable_seqscan=true;
Expand Down Expand Up @@ -170,11 +171,11 @@ SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' <@ p;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE sline(spoint '(0d, -10d)', spoint '(0d, 10d)') && p;
QUERY PLAN
--------------------------------------------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------------------------------------------------
Aggregate
-> Seq Scan on bbox_path
Filter: ('( 6.10865238198015, 1.5707963267949, 0, ZXZ ), 0.349065850398866'::sline && p)
Filter: ('( 6.1086523819801535, 1.5707963267948966, 0, ZXZ ), 0.34906585039886584'::sline && p)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' @ p;
Expand Down Expand Up @@ -215,11 +216,11 @@ SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' <@ p;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE sline(spoint '(0d, -10d)', spoint '(0d, 10d)') && p;
QUERY PLAN
------------------------------------------------------------------------------------------------------
QUERY PLAN
-------------------------------------------------------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_path on bbox_path
Index Cond: ('( 6.10865238198015, 1.5707963267949, 0, ZXZ ), 0.349065850398866'::sline && p)
Index Cond: ('( 6.1086523819801535, 1.5707963267948966, 0, ZXZ ), 0.34906585039886584'::sline && p)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' @ p;
Expand Down
37 changes: 19 additions & 18 deletions expected/bounding_box_gist_1.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SET extra_float_digits = 2;
SET enable_seqscan=true;
CREATE TABLE bbox_ellipse (e sellipse not null);
INSERT INTO bbox_ellipse VALUES ('<{10d, 0.1d}, (0d,0d), 0d>');
Expand All @@ -20,19 +21,19 @@ SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' @ e;
QUERY PLAN
----------------------------------------------------------
QUERY PLAN
-----------------------------------------------------------
Aggregate
-> Seq Scan on bbox_ellipse
Filter: ('(0.0872664625997165 , 0)'::spoint @ e)
Filter: ('(0.08726646259971647 , 0)'::spoint @ e)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
QUERY PLAN
-----------------------------------------------------------
QUERY PLAN
------------------------------------------------------------
Aggregate
-> Seq Scan on bbox_ellipse
Filter: ('(0.0872664625997165 , 0)'::spoint <@ e)
Filter: ('(0.08726646259971647 , 0)'::spoint <@ e)
(3 rows)

-- The ellipse has semi-major axis length of 10 degrees along the equator,
Expand All @@ -53,19 +54,19 @@ SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' @ e;
QUERY PLAN
--------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_ellipse on bbox_ellipse
Index Cond: (e ~ '(0.0872664625997165 , 0)'::spoint)
Index Cond: (e ~ '(0.08726646259971647 , 0)'::spoint)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_ellipse WHERE spoint '(5d, 0d)' <@ e;
QUERY PLAN
---------------------------------------------------------------
QUERY PLAN
----------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_ellipse on bbox_ellipse
Index Cond: (e @> '(0.0872664625997165 , 0)'::spoint)
Index Cond: (e @> '(0.08726646259971647 , 0)'::spoint)
(3 rows)

SET enable_seqscan=true;
Expand Down Expand Up @@ -170,11 +171,11 @@ SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' <@ p;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE sline(spoint '(0d, -10d)', spoint '(0d, 10d)') && p;
QUERY PLAN
--------------------------------------------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------------------------------------------------
Aggregate
-> Seq Scan on bbox_path
Filter: ('( 6.10865238198015, 1.5707963267949, 0, ZXZ ), 0.349065850398866'::sline && p)
Filter: ('( 6.1086523819801535, 1.5707963267948966, 0, ZXZ ), 0.34906585039886584'::sline && p)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' @ p;
Expand Down Expand Up @@ -215,11 +216,11 @@ SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' <@ p;
(1 row)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE sline(spoint '(0d, -10d)', spoint '(0d, 10d)') && p;
QUERY PLAN
------------------------------------------------------------------------------------------------------
QUERY PLAN
-------------------------------------------------------------------------------------------------------------
Aggregate
-> Index Scan using idx_bbox_path on bbox_path
Index Cond: (p && '( 6.10865238198015, 1.5707963267949, 0, ZXZ ), 0.349065850398866'::sline)
Index Cond: (p && '( 6.1086523819801535, 1.5707963267948966, 0, ZXZ ), 0.34906585039886584'::sline)
(3 rows)

EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM bbox_path WHERE spoint '(0d, 0d)' @ p;
Expand Down
Loading

0 comments on commit 7b3b114

Please sign in to comment.