Separate out LATERAL Issue #73 into xl_known_bugs
authorPallavi Sontakke <[email protected]>
Thu, 16 Jun 2016 08:53:47 +0000 (14:23 +0530)
committerPallavi Sontakke <[email protected]>
Thu, 16 Jun 2016 08:53:47 +0000 (14:23 +0530)
src/test/regress/expected/tablesample.out
src/test/regress/expected/xl_known_bugs.out
src/test/regress/sql/tablesample.sql
src/test/regress/sql/xl_known_bugs.sql

index 12e87f06f80f5ee5fb2c3803c514a3814a70942e..190c5a2e8d7d35faa6575d118413793fef1fe27f 100644 (file)
@@ -254,22 +254,6 @@ select pct, count(unique1) from
                            Sampling: bernoulli ("*VALUES*".column1)
 (8 rows)
 
-select pct, count(unique1) from
-  (values (0),(100)) v(pct),
-  lateral (select * from tenk1 tablesample bernoulli (pct)) ss
-  group by pct;
- pct | count 
------+-------
-(0 rows)
-
-select pct, count(unique1) from
-  (values (0),(100)) v(pct),
-  lateral (select * from tenk1 tablesample system (pct)) ss
-  group by pct;
- pct | count 
------+-------
-(0 rows)
-
 -- errors
 SELECT id FROM test_tablesample TABLESAMPLE FOOBAR (1);
 ERROR:  tablesample method foobar does not exist
index 7fd2c62668283cb82e5c530ce4378ebdc1a2b507..cfef50f9697d613959c4e1d05e2341c972abd2a4 100644 (file)
@@ -693,3 +693,24 @@ SELECT *, (equipment(CAST((h.*) AS hobbies_r))).name FROM hobbies_r h ORDER BY 1
 ------+--------+------
 (0 rows)
 
+------------------------------------------
+-- from tablesample
+select pct, count(unique1) from
+  (values (0),(100)) v(pct),
+  lateral (select * from tenk1 tablesample bernoulli (pct)) ss
+  group by pct;
+ pct | count 
+-----+-------
+ 100 | 10000
+(1 row)
+
+select pct, count(unique1) from
+  (values (0),(100)) v(pct),
+  lateral (select * from tenk1 tablesample system (pct)) ss
+  group by pct;
+ pct | count 
+-----+-------
+ 100 | 10000
+(1 row)
+
+------------------------------------------
index eec97934966966229800a47563153669b5ea353a..8e3758af6ea54f1224250793d63d6cc430049fd9 100644 (file)
@@ -73,14 +73,6 @@ select pct, count(unique1) from
   (values (0),(100)) v(pct),
   lateral (select * from tenk1 tablesample bernoulli (pct)) ss
   group by pct;
-select pct, count(unique1) from
-  (values (0),(100)) v(pct),
-  lateral (select * from tenk1 tablesample bernoulli (pct)) ss
-  group by pct;
-select pct, count(unique1) from
-  (values (0),(100)) v(pct),
-  lateral (select * from tenk1 tablesample system (pct)) ss
-  group by pct;
 
 -- errors
 SELECT id FROM test_tablesample TABLESAMPLE FOOBAR (1);
index 5afcf1272e32c638785a0bf6174c5a416cbeaf73..d1fa0519df79836061cff64be058359ce405b9d2 100644 (file)
@@ -255,3 +255,19 @@ SELECT name(equipment(ROW('skywalking', 'mer')));
 SELECT *, name(equipment(h.*)) FROM hobbies_r h ORDER BY 1,2,3;
 
 SELECT *, (equipment(CAST((h.*) AS hobbies_r))).name FROM hobbies_r h ORDER BY 1,2,3;
+
+------------------------------------------
+
+-- from tablesample
+
+select pct, count(unique1) from
+  (values (0),(100)) v(pct),
+  lateral (select * from tenk1 tablesample bernoulli (pct)) ss
+  group by pct;
+
+select pct, count(unique1) from
+  (values (0),(100)) v(pct),
+  lateral (select * from tenk1 tablesample system (pct)) ss
+  group by pct;
+
+------------------------------------------