You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Chaoyu Tang (JIRA)" <ji...@apache.org> on 2015/04/14 20:23:12 UTC

[jira] [Updated] (HIVE-10307) Support to use number literals in partition column

     [ https://issues.apache.org/jira/browse/HIVE-10307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chaoyu Tang updated HIVE-10307:
-------------------------------
    Attachment: HIVE-10307.patch

This patch is to:
1. support number literals in partition specification.
2. support the validation/conversion/normalization the partVal in partSpec to match its column type when hive.partition.check.column.type is set to true (default). It not only covers insert operation which used to be controlled by "hive.typecheck.on.insert", but also for other partition operations like alter table .. partition, describe, statistics etc. The hive.typecheck.on.insert is depreciated and replaced by this new property.
3. support the conversion/normalization of legacy partition column data by using alter table partition .. rename with hive.partition.check.old.column.type.in.rename set to true. This property only allows the partVal in old PartSpec to skip the type check in partition rename.

> Support to use number literals in partition column
> --------------------------------------------------
>
>                 Key: HIVE-10307
>                 URL: https://issues.apache.org/jira/browse/HIVE-10307
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>    Affects Versions: 1.0.0
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-10307.patch
>
>
> Data types like TinyInt, SmallInt, BigInt or Decimal can be expressed as literals with postfix like Y, S, L, or BD appended to the number. These literals work in most Hive queries, but do not when they are used as partition column value. For a partitioned table like:
> create table partcoltypenum (key int, value string) partitioned by (tint tinyint, sint smallint, bint bigint);
> insert into partcoltypenum partition (tint=100Y, sint=10000S, bint=100000000000L) select key, value from src limit 30;
> Queries like select, describe and drop partition do not work. For an example
> select * from partcoltypenum where tint=100Y and sint=10000S and bint=100000000000L;
> does not return any rows.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)