संस्करण 0.9.0 के रूप में आप ड्रॉप विभाजन कथन में comparators का उपयोग कर सकते हैं जिसका उपयोग सभी विभाजनों को एक बार में छोड़ने के लिए किया जा सकता है।
एक उदाहरण है, drop_partitions_filter.q testcase से लिया:
CREATE TABLE t2 AS
SELECT column_name_1, ..., column_name_N FROM t1;
केवल मामला है कि यह गैर कठोर मोड में किया जाना चाहिए है:
create table ptestfilter (a string, b int) partitioned by (c string, d string);
alter table ptestfilter add partition (c='US', d=1);
alter table ptestfilter add partition (c='US', d=2);
alter table ptestFilter add partition (c='Uganda', d=2);
alter table ptestfilter add partition (c='Germany', d=2);
alter table ptestfilter add partition (c='Canada', d=3);
alter table ptestfilter add partition (c='Russia', d=3);
alter table ptestfilter add partition (c='Greece', d=2);
alter table ptestfilter add partition (c='India', d=3);
alter table ptestfilter add partition (c='France', d=4);
show partitions ptestfilter;
alter table ptestfilter drop partition (c>'0', d>'0');
show partitions ptestfilter;
स्रोत
2013-03-19 08:49:49
'विफल: अर्थपूर्ण विश्लेषण में त्रुटि: 1:23 विभाजन कॉलम निर्दिष्ट करने की आवश्यकता है क्योंकि गंतव्य तालिका विभाजित है। टोकन 't1'' –
@ मैटजॉइनर के पास त्रुटि आई, लेकिन पूर्ण क्रेडिट बालास्वामी वाडेमन को जाता है। – www