expose floor variable and new test file

This commit is contained in:
Michelle Ho
2017-02-16 15:49:09 -05:00
parent ae767fc903
commit c6eb5d9d19
5 changed files with 86 additions and 11 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ CREATE OR REPLACE FUNCTION
CDB_MaxP(
subquery TEXT,
colnames TEXT[],
floor_variable TEXT,
min_size int default 1,
initial int default 99,
geom_col TEXT DEFAULT 'the_geom',
@@ -12,5 +13,5 @@ RETURNS TABLE (region_class text, p_val numeric, rowid bigint)
AS $$
from crankshaft.clustering import MaxP
maxp = MaxP()
return maxp.maxp(subquery, colnames, floor=min_size)
return maxp.maxp(subquery, colnames, floor_variable, floor=min_size)
$$ LANGUAGE plpythonu;