Created
December 7, 2017 19:03
-
-
Save d/c65347ac8135f53ce3ea34a2baea2d94 to your computer and use it in GitHub Desktop.
split rows bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE rank_exc( | |
id int, | |
year int, | |
gender char(1) | |
) | |
DISTRIBUTED BY (id) | |
PARTITION BY LIST (gender) | |
SUBPARTITION BY RANGE (year) | |
SUBPARTITION TEMPLATE ( | |
SUBPARTITION year1 START (2001), | |
SUBPARTITION year6 START (2006) END (2007) ) | |
(PARTITION girls VALUES ('F'), | |
PARTITION boys VALUES ('M') | |
); | |
alter table rank_exc alter partition boys add default partition bfuture; | |
insert into rank_exc values(2, 2, 2008, 'M', 3); | |
alter table rank_exc alter partition boys split default partition start ('2007') | |
end ('2008') into (partition bfuture, partition year7); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment