Jenks: Add test for less data than breaks

This commit is contained in:
Raul Marin 2018-09-10 16:13:25 +02:00
parent e374b9128f
commit 7e131ac88d
2 changed files with 9 additions and 0 deletions

View File

@ -28,3 +28,9 @@ WITH data_inverse AS (
20.1, 19.9]::numeric[] AS s 20.1, 19.9]::numeric[] AS s
) )
SELECT unnest(CDB_JenksBins(s, 5, 0, true)) FROM data_inverse; SELECT unnest(CDB_JenksBins(s, 5, 0, true)) FROM data_inverse;
WITH data_small AS (
SELECT Array[0.99, 1.0, 10.01, 10.01, 10.01, 10.01]::numeric[] AS s
)
SELECT unnest(CDB_JenksBins(s, 4)) FROM data_small;

View File

@ -13,3 +13,6 @@
10.01 10.01
14.99 14.99
19.9 19.9
0.99
1.0
10.01