I think the documentation related to exchanging partitions is not accurate

https://cwiki.apache.org/confluence/display/Hive/Exchange+Partition

when I try it out on hortonworks sandbox 2.1 which runs Hive 0.13 I get
this:

hive> create table T1(a string, b string) partitioned by (ds string);

OK

Time taken: 0.72 seconds

hive> create table T2(a string, b string);

OK

Time taken: 0.357 seconds

hive> alter table T1 exchange partition (ds='1') with table T2;

FAILED: SemanticException [Error 10235]: Tables have incompatible schemas
and their partitions  cannot be exchanged.

Reply via email to