From 6f72075999b3d3887018d9574e4e25abd5214873 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 22 Jun 2016 16:50:10 -0400 Subject: [PATCH 1/4] altering test outputs for less formatting --- src/pg/test/expected/08_interpolation_test.out | 6 ++---- src/pg/test/sql/08_interpolation_test.sql | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pg/test/expected/08_interpolation_test.out b/src/pg/test/expected/08_interpolation_test.out index 42d24cb..b927f63 100644 --- a/src/pg/test/expected/08_interpolation_test.out +++ b/src/pg/test/expected/08_interpolation_test.out @@ -1,4 +1,2 @@ - cdb_spatialinterpolation --------------------------- - 780.79470198683925288365 -(1 row) +cdb_spatialinterpolation +t diff --git a/src/pg/test/sql/08_interpolation_test.sql b/src/pg/test/sql/08_interpolation_test.sql index c8db89d..43e7ee9 100644 --- a/src/pg/test/sql/08_interpolation_test.sql +++ b/src/pg/test/sql/08_interpolation_test.sql @@ -1,6 +1,9 @@ +\pset format unaligned +\set ECHO all + WITH a AS ( SELECT ARRAY[800, 700, 600, 500, 400, 300, 200, 100] AS vals, ARRAY[ST_GeomFromText('POINT(2.1744 41.403)'),ST_GeomFromText('POINT(2.1228 41.380)'),ST_GeomFromText('POINT(2.1511 41.374)'),ST_GeomFromText('POINT(2.1528 41.413)'),ST_GeomFromText('POINT(2.165 41.391)'),ST_GeomFromText('POINT(2.1498 41.371)'),ST_GeomFromText('POINT(2.1533 41.368)'),ST_GeomFromText('POINT(2.131386 41.41399)')] AS g ) -SELECT CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'),1) FROM a; +SELECT (cdb_crankshaft.CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'), 1) - 780.79470198683925288365) / 780.79470198683925288365 < 0.001 FROM a; From 6a9045ba62551e4db3637ad99acad52d591092bd Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 22 Jun 2016 16:56:35 -0400 Subject: [PATCH 2/4] updating test outputs --- src/pg/test/expected/08_interpolation_test.out | 8 ++++++++ src/pg/test/sql/08_interpolation_test.sql | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pg/test/expected/08_interpolation_test.out b/src/pg/test/expected/08_interpolation_test.out index b927f63..49566db 100644 --- a/src/pg/test/expected/08_interpolation_test.out +++ b/src/pg/test/expected/08_interpolation_test.out @@ -1,2 +1,10 @@ +\pset format unaligned +\set ECHO all + +WITH a AS ( + SELECT + ARRAY[800, 700, 600, 500, 400, 300, 200, 100] AS vals, + ARRAY[ST_GeomFromText('POINT(2.1744 41.403)'),ST_GeomFromText('POINT(2.1228 41.380)'),ST_GeomFromText('POINT(2.1511 41.374)'),ST_GeomFromText('POINT(2.1528 41.413)'),ST_GeomFromText('POINT(2.165 41.391)'),ST_GeomFromText('POINT(2.1498 41.371)'),ST_GeomFromText('POINT(2.1533 41.368)'),ST_GeomFromText('POINT(2.131386 41.41399)')] AS g +) cdb_spatialinterpolation t diff --git a/src/pg/test/sql/08_interpolation_test.sql b/src/pg/test/sql/08_interpolation_test.sql index 43e7ee9..ba8968f 100644 --- a/src/pg/test/sql/08_interpolation_test.sql +++ b/src/pg/test/sql/08_interpolation_test.sql @@ -6,4 +6,4 @@ WITH a AS ( ARRAY[800, 700, 600, 500, 400, 300, 200, 100] AS vals, ARRAY[ST_GeomFromText('POINT(2.1744 41.403)'),ST_GeomFromText('POINT(2.1228 41.380)'),ST_GeomFromText('POINT(2.1511 41.374)'),ST_GeomFromText('POINT(2.1528 41.413)'),ST_GeomFromText('POINT(2.165 41.391)'),ST_GeomFromText('POINT(2.1498 41.371)'),ST_GeomFromText('POINT(2.1533 41.368)'),ST_GeomFromText('POINT(2.131386 41.41399)')] AS g ) -SELECT (cdb_crankshaft.CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'), 1) - 780.79470198683925288365) / 780.79470198683925288365 < 0.001 FROM a; +SELECT (cdb_crankshaft.CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'), 1) - 780.79470198683925288365) / 780.79470198683925288365 < 0.001 As cdb_spatialinterpolation FROM a; From 3f210c2a71b02b5b8b6a527b79514a9c19260ce3 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 22 Jun 2016 17:08:50 -0400 Subject: [PATCH 3/4] reducing amt of text in outputs --- src/pg/test/expected/08_interpolation_test.out | 10 ++-------- src/pg/test/sql/08_interpolation_test.sql | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/pg/test/expected/08_interpolation_test.out b/src/pg/test/expected/08_interpolation_test.out index 49566db..bb8c73e 100644 --- a/src/pg/test/expected/08_interpolation_test.out +++ b/src/pg/test/expected/08_interpolation_test.out @@ -1,10 +1,4 @@ -\pset format unaligned -\set ECHO all - -WITH a AS ( - SELECT - ARRAY[800, 700, 600, 500, 400, 300, 200, 100] AS vals, - ARRAY[ST_GeomFromText('POINT(2.1744 41.403)'),ST_GeomFromText('POINT(2.1228 41.380)'),ST_GeomFromText('POINT(2.1511 41.374)'),ST_GeomFromText('POINT(2.1528 41.413)'),ST_GeomFromText('POINT(2.165 41.391)'),ST_GeomFromText('POINT(2.1498 41.371)'),ST_GeomFromText('POINT(2.1533 41.368)'),ST_GeomFromText('POINT(2.131386 41.41399)')] AS g -) +SET client_min_messages TO WARNING; +\set ECHO none cdb_spatialinterpolation t diff --git a/src/pg/test/sql/08_interpolation_test.sql b/src/pg/test/sql/08_interpolation_test.sql index ba8968f..bd9c729 100644 --- a/src/pg/test/sql/08_interpolation_test.sql +++ b/src/pg/test/sql/08_interpolation_test.sql @@ -1,5 +1,6 @@ +SET client_min_messages TO WARNING; +\set ECHO none \pset format unaligned -\set ECHO all WITH a AS ( SELECT From 2fa087bb62544cda84931f8c39233074572c9564 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 22 Jun 2016 17:11:51 -0400 Subject: [PATCH 4/4] adding row info :/ --- src/pg/test/expected/08_interpolation_test.out | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pg/test/expected/08_interpolation_test.out b/src/pg/test/expected/08_interpolation_test.out index bb8c73e..635ca2a 100644 --- a/src/pg/test/expected/08_interpolation_test.out +++ b/src/pg/test/expected/08_interpolation_test.out @@ -2,3 +2,4 @@ SET client_min_messages TO WARNING; \set ECHO none cdb_spatialinterpolation t +(1 row)