In Hive why I am not allowed to nest a static partition under a dynamic partition?
for eg the below is allowed
INSERT OVERWRITE TABLE T PARTITION (ds='2010-03-03', hr)
SELECT key, value, /*ds,*/ hr FROM srcpart WHERE ds is not null and hr>10;
but this is not allowed
INSERT OVERWRITE TABLE T PARTITION (ds, hr = 11)
SELECT key, value, ds/*, hr*/ FROM srcpart WHERE ds is not null and hr=11;
I find the official wiki page explanation (shown below) insufficient. Prefer a logical explanation or an explanation at underlying map-reduce level.
SP is a subpartition of a DP: should throw an error because partition column order determins directory hierarchy. We cannot change the hierarchy in DML