create table pat(a int, b date) partition by range (b) (start ('2010-01-01') end ('2010-01-05') every (1), default partition other);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
NOTICE: CREATE TABLE will create partition "pat_1_prt_other" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_2" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_3" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_4" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_5" for table "pat"
insert into pat select i,date '2010-01-01' + i from generate_series(1, 10)i;
create table jpat(a int, b date);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into jpat values(1, '2010-01-02');
-- end_ignore
select count_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);', 'Append') > 0;
?column?
----------
t
(1 row)
select count_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);', 'Dynamic Table Scan') > 0;
?column?
----------
f
(1 row)
select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);
create table pat(a int, b date) partition by range (b) (start ('2010-01-01') end ('2010-01-05') every (1), default partition other);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
NOTICE: CREATE TABLE will create partition "pat_1_prt_other" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_2" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_3" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_4" for table "pat"
NOTICE: CREATE TABLE will create partition "pat_1_prt_5" for table "pat"
insert into pat select i,date '2010-01-01' + i from generate_series(1, 10)i;
create table jpat(a int, b date);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into jpat values(1, '2010-01-02');
-- end_ignore
select count_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);', 'Append') > 0;
?column?
----------
f
(1 row)
select count_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);', 'Dynamic Table Scan') > 0;
?column?
----------
t
(1 row)
select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);
@@ -195,34 +195,4 @@ select count_operator('explain select count(*) from foo1,foo2 where foo1.j =foo2
selectcount_operator('explain select count(*) from foo1,foo2 where foo1.j =foo2.j and foo2.i <= ALL(select 1 UNION select 2);','Dynamic Table Scan')>0;
selectcount_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);','Append')>0;
selectcount_operator('explain select * from (select count(*) over (order by a rows between 1 preceding and 1 following), a, b from jpat)jpat inner join pat using(b);','Dynamic Table Scan')>0;