hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (Commented) (JIRA)" <>
Subject [jira] [Commented] (HIVE-2702) listPartitionsByFilter only supports non-string partitions
Date Fri, 16 Mar 2012 08:33:41 GMT


Ashutosh Chauhan commented on HIVE-2702:

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:
>             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 
> //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:!default.jspa
For more information on JIRA, see:


View raw message