[ https://issues.apache.org/jira/browse/HIVE-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230971#comment-13230971 ]
Ashutosh Chauhan commented on HIVE-2702: ---------------------------------------- @Aniket, This is by design. Partition values are stored as strings in backend db (mysql) so pushing filters into db where partition column is of numeric types won't work, since then comparison will happen lexicographically. You should be able to catch this with rigorous tests. e.g., with your patch on, create table with partition key of int type, add partitions 1-11 and then do filter p < 2 and you will get partitions 1,10,11 instead of 1. Though, you can still push equality predicate. Enabling this feature requires mysql table schema updates which can retain type information for partition keys. > listPartitionsByFilter only supports non-string partitions > ---------------------------------------------------------- > > Key: HIVE-2702 > URL: https://issues.apache.org/jira/browse/HIVE-2702 > Project: Hive > Issue Type: Bug > Affects Versions: 0.8.1 > Reporter: Aniket Mokashi > Assignee: Aniket Mokashi > Attachments: HIVE-2702.1.patch, HIVE-2702.D2043.1.patch > > > listPartitionsByFilter supports only non-string partitions. This is because > its explicitly specified in generateJDOFilterOverPartitions in > ExpressionTree.java. > //Can only support partitions whose types are string > if( ! table.getPartitionKeys().get(partitionColumnIndex). > > getType().equals(org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME) ) { > throw new MetaException > ("Filtering is supported only on partition keys of type string"); > } -- 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