[ 
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 partitioning column 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)

The same issue is even with int and partition column value of 2,147,483,648 
which exceeds the int limit (INT (4-byte signed integer, from -2,147,483,648 to 
2,147,483,647))
)


  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 (SMALLINT (2-byte signed integer, from -32,768 to 32,767)
)



> 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 partitioning column 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)
> The same issue is even with int and partition column value of 2,147,483,648 
> which exceeds the int limit (INT (4-byte signed integer, from -2,147,483,648 
> to 2,147,483,647))
> )



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

Reply via email to