You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Joy SN (JIRA)" <ji...@apache.org> on 2014/10/17 08:11:33 UTC

[jira] [Updated] (HIVE-8494) Hive partitioned table with smallint datatype

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

Joy SN updated HIVE-8494:
-------------------------
    Description: 
create a hive partitioned table with datatype smallint

ol_name        data_type       comment
a                       int                     None
b                       int                     None
c                       int                     None
p                       smallint                None

# Partition Information
# col_name              data_type               comment

p                       smallint                None

Put the following data. See the partition value is 32768 - which exceeds the smallint limit by 1
select * from t;
a       b       c       p
1       2       3       32768
4       5       6       32768
7       8       9       32768

hive> select sum(p) from t;
also works
but
hive> select min(p) from t;
fails

It should disallow creation of partition with value 32768 as it exceeds the smallint limit (SMALLINT (2-byte signed integer, from -32,768 to 32,767)
)


  was:
create a hive partitioned table with datatype smallint

ol_name        data_type       comment
a                       int                     None
b                       int                     None
c                       int                     None
p                       smallint                None

# Partition Information
# col_name              data_type               comment

p                       smallint                None

Put the following data. See the partition value is 32768 - which exceeds the smallint limit by 1
select * from t;
a       b       c       p
1       2       3       32768
4       5       6       32768
7       8       9       32768

hive> select sum(p) from t;
also works
but
hive> select min(p) from t;
fails

It should disallow creation of partition with value 32768 as it exceeds the smallint limit



> Hive partitioned table with smallint datatype
> ---------------------------------------------
>
>                 Key: HIVE-8494
>                 URL: https://issues.apache.org/jira/browse/HIVE-8494
>             Project: Hive
>          Issue Type: Bug
>          Components: CLI, Query Processor
>    Affects Versions: 0.12.0, 0.13.0
>            Reporter: Joy SN
>
> create a hive partitioned table with datatype smallint
> ol_name        data_type       comment
> a                       int                     None
> b                       int                     None
> c                       int                     None
> p                       smallint                None
> # Partition Information
> # col_name              data_type               comment
> p                       smallint                None
> Put the following data. See the partition value is 32768 - which exceeds the smallint limit by 1
> select * from t;
> a       b       c       p
> 1       2       3       32768
> 4       5       6       32768
> 7       8       9       32768
> hive> select sum(p) from t;
> also works
> but
> hive> select min(p) from t;
> fails
> It should disallow creation of partition with value 32768 as it exceeds the smallint limit (SMALLINT (2-byte signed integer, from -32,768 to 32,767)
> )



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