[ https://issues.apache.org/jira/browse/HIVE-2908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240860#comment-13240860 ]
Phabricator commented on HIVE-2908: ----------------------------------- sambavim has commented on the revision "HIVE-2908 [jira] Hive: Extend ALTER TABLE DROP PARTITION syntax to use all comparators". Will update review once I make the change to the error message. INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/plan/PartitionSpec.java:61 I found the != produced the unexpected side effect that it actually behaved like an =. That was obviously a problem, so I decided to just convert it to a <> for safety. I didn't debug why I got that behavior with a !=, but I suspect it is because != is not a valid operator on a filter against the database. What was surprising is the outcome of deleting the partition that was specified in the !=. ql/src/test/queries/clientpositive/drop_partitions_filter.q:18 I'll test it and report back. ql/src/test/results/clientnegative/drop_partition_filter_failure.q.out:18 Will fix. Good catch. REVISION DETAIL https://reviews.facebook.net/D2523 > 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 > > 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