From 0742e3f72a7002652163880ad2d80e9d34a6c5d8 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Thu, 18 Feb 2016 16:10:34 +0100 Subject: [PATCH] Rename cdb_random_seeds as 'internal' --- pg/sql/0.0.1/01_random_seeds.sql | 3 ++- pg/test/0.0.1/expected/02_moran_test.out | 12 ++++++------ pg/test/0.0.1/sql/02_moran_test.sql | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pg/sql/0.0.1/01_random_seeds.sql b/pg/sql/0.0.1/01_random_seeds.sql index a3fd3c5..2b62be3 100644 --- a/pg/sql/0.0.1/01_random_seeds.sql +++ b/pg/sql/0.0.1/01_random_seeds.sql @@ -1,7 +1,8 @@ +-- Internal function. -- Set the seeds of the RNGs (Random Number Generators) -- used internally. CREATE OR REPLACE FUNCTION -cdb_random_seeds (seed_value INTEGER) RETURNS VOID +_cdb_random_seeds (seed_value INTEGER) RETURNS VOID AS $$ from crankshaft import random_seeds random_seeds.set_random_seeds(seed_value) diff --git a/pg/test/0.0.1/expected/02_moran_test.out b/pg/test/0.0.1/expected/02_moran_test.out index ee67ecb..6ca4900 100644 --- a/pg/test/0.0.1/expected/02_moran_test.out +++ b/pg/test/0.0.1/expected/02_moran_test.out @@ -113,9 +113,9 @@ INSERT INTO ppoints2 VALUES -- Moral functions perform some nondeterministic computations -- (to estimate the significance); we will set the seeds for the RNGs -- that affect those results to have repeateble results -SELECT cdb_crankshaft.cdb_random_seeds(1234); - cdb_random_seeds ------------------- +SELECT cdb_crankshaft._cdb_random_seeds(1234); + _cdb_random_seeds +------------------- (1 row) @@ -186,9 +186,9 @@ CONTEXT: PL/Python function "cdb_moran_local" 52 | LL (52 rows) -SELECT cdb_crankshaft.cdb_random_seeds(1234); - cdb_random_seeds ------------------- +SELECT cdb_crankshaft._cdb_random_seeds(1234); + _cdb_random_seeds +------------------- (1 row) diff --git a/pg/test/0.0.1/sql/02_moran_test.sql b/pg/test/0.0.1/sql/02_moran_test.sql index a320806..f2e7257 100644 --- a/pg/test/0.0.1/sql/02_moran_test.sql +++ b/pg/test/0.0.1/sql/02_moran_test.sql @@ -4,7 +4,7 @@ -- Moral functions perform some nondeterministic computations -- (to estimate the significance); we will set the seeds for the RNGs -- that affect those results to have repeateble results -SELECT cdb_crankshaft.cdb_random_seeds(1234); +SELECT cdb_crankshaft._cdb_random_seeds(1234); SELECT ppoints.code, m.quads FROM ppoints @@ -12,7 +12,7 @@ SELECT ppoints.code, m.quads ON ppoints.cartodb_id = m.ids ORDER BY ppoints.code; -SELECT cdb_crankshaft.cdb_random_seeds(1234); +SELECT cdb_crankshaft._cdb_random_seeds(1234); SELECT ppoints2.code, m.quads FROM ppoints2