Should we disable dynamic partitioning for multi-insert when one table is
mentioned several times?


create table intermediate (key int, p int);

.. insert some data
create table test (key int, key2 int) partitioned by (p int);


This is explicitly not allowed:
from intermediate
insert into table test partition(p=1) select p, key
insert into table test partition(p=1) select key, p;


But this is allowed (as is regular dynamic partitioning that could result
in the same effect without us knowing):
from intermediate
insert into table test partition(p) select p, key, 1
insert into table test partition(p=1) select key, p;

You could even do this:
from intermediate
insert overwrite table test partition(p) select p, key, 1
insert overwrite table test partition(p=1) select key, p;

What the last one SHOULD produce I do not know.








Reply via email to