[ https://issues.apache.org/jira/browse/HIVE-2908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HIVE-2908: ------------------------------ Attachment: HIVE-2908.D2523.2.patch sambavim updated the revision "HIVE-2908 [jira] Hive: Extend ALTER TABLE DROP PARTITION syntax to use all comparators". Reviewers: JIRA, njain, kevinwilfong Updated the error message generated in DDLSemanticAnalyzer.java when the drop partition filter does not generate any partitions to drop. Tested the drop_partitions_filter test with a filter d < 2 instead of d < '2' - the former does not work, and the implementation of getPartitionsWithFilter says that it only works on string partition keys. Somehow providing a string value for the integer key seems to work although this seems hacky. The documentation should mention that this is only for string keys. When and how should I update the documentation? REVISION DETAIL https://reviews.facebook.net/D2523 AFFECTED FILES ql/src/test/results/clientpositive/drop_partitions_filter.q.out ql/src/test/results/clientpositive/drop_multi_partitions.q.out ql/src/test/results/clientnegative/drop_partition_filter_failure.q.out ql/src/test/results/clientnegative/drop_partition_failure.q.out ql/src/test/queries/clientpositive/drop_partitions_filter.q ql/src/test/queries/clientnegative/drop_partition_filter_failure.q ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/PartitionSpec.java ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java > Hive: Extend ALTER TABLE DROP PARTITION syntax to use all comparators > --------------------------------------------------------------------- > > Key: HIVE-2908 > URL: https://issues.apache.org/jira/browse/HIVE-2908 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Sambavi Muthukrishnan > Assignee: Sambavi Muthukrishnan > Priority: Minor > Attachments: HIVE-2908.D2523.1.patch, HIVE-2908.D2523.2.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > To drop a partition from a Hive table, this works: > ALTER TABLE foo DROP PARTITION(ds = 'date') > ...but it should also work to drop all partitions prior to date. > ALTER TABLE foo DROP PARTITION(ds < 'date') > This task is to implement ALTER TABLE DROP PARTITION for all of the > comparators, < > <= >= <> = != instead of just for =. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira