Repository: incubator-madlib Updated Branches: refs/heads/master fabf25b9b -> fdf7b6d54
Fix stratified sampling gpdb IC bug Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/fdf7b6d5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/fdf7b6d5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/fdf7b6d5 Branch: refs/heads/master Commit: fdf7b6d540b201b29aab70886b3f9c77772564d8 Parents: fabf25b Author: Orhan Kislal <okis...@pivotal.io> Authored: Wed Jun 28 10:49:24 2017 -0700 Committer: Orhan Kislal <okis...@pivotal.io> Committed: Wed Jun 28 10:49:24 2017 -0700 ---------------------------------------------------------------------- src/ports/postgres/modules/sample/test/stratified_sample.sql_in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/fdf7b6d5/src/ports/postgres/modules/sample/test/stratified_sample.sql_in ---------------------------------------------------------------------- diff --git a/src/ports/postgres/modules/sample/test/stratified_sample.sql_in b/src/ports/postgres/modules/sample/test/stratified_sample.sql_in index b889260..6ddcbfd 100644 --- a/src/ports/postgres/modules/sample/test/stratified_sample.sql_in +++ b/src/ports/postgres/modules/sample/test/stratified_sample.sql_in @@ -62,8 +62,8 @@ SELECT assert(count(*) = 13, 'Wrong number of samples') FROM out; DROP TABLE IF EXISTS out; SELECT stratified_sample('test', 'out', 0.5, 'gr1,gr2', 'id1,id2', FALSE); -SELECT assert(count(DISTINCT (id1,id2)) = 3, 'Wrong number of samples') -FROM out WHERE gr1 = 1 AND gr2 = 2; +SELECT assert(count(*) = 3, 'Wrong number of samples') +FROM (SELECT DISTINCT id1,id2 FROM out WHERE gr1 = 1 AND gr2 = 2)x; DROP TABLE IF EXISTS out; SELECT stratified_sample('test', 'out', 0.5, NULL, 'id1,id2,gr1,gr2', TRUE);