Skip to content

Instantly share code, notes, and snippets.

@d
Created December 7, 2017 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d/c65347ac8135f53ce3ea34a2baea2d94 to your computer and use it in GitHub Desktop.
Save d/c65347ac8135f53ce3ea34a2baea2d94 to your computer and use it in GitHub Desktop.
split rows bug
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