hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Weeks (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-15692) Can't Create Table with Interval Column Type
Date Sun, 22 Jan 2017 20:15:27 GMT

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

Shawn Weeks updated HIVE-15692:
-------------------------------
    Description: 
You can create a table with an interval type via create table as select but not directly with
create table.

This works

{code}
create table test_interval 
as 
select  interval '1' day as day_interval, 
        interval '1' month as month_interval;
{code}

{code}
describe test_interval;
+-----------------+----------------------+----------+--+
|    col_name     |      data_type       | comment  |
+-----------------+----------------------+----------+--+
| day_interval    | interval_day_time    |          |
| month_interval  | interval_year_month  |          |
+-----------------+----------------------+----------+--+
{code}

This raises an error.

{code}
create table test_interval(                                                         
   day_interval 	interval_day_time,                                                   
   month_interval 	interval_year_month
   );
{code}


  was:
You can create a table with an interval type via create table as select but not directly with
create table.

This works

create table test_interval
as
select 	interval '1' day as day_interval,
		interval '1' month as month_interval;

This raises an error.

create table test_interval(                                                         
   day_interval 	interval_day_time,                                                   
   month_interval 	interval_year_month
   );



> Can't Create Table with Interval Column Type
> --------------------------------------------
>
>                 Key: HIVE-15692
>                 URL: https://issues.apache.org/jira/browse/HIVE-15692
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 1.2.1
>         Environment: CentOS 6.8 Hortonworks HDP 2.5 Apache Hive (version 1.2.1000.2.5.3.0-37)
>            Reporter: Shawn Weeks
>            Priority: Minor
>
> You can create a table with an interval type via create table as select but not directly
with create table.
> This works
> {code}
> create table test_interval 
> as 
> select  interval '1' day as day_interval, 
>         interval '1' month as month_interval;
> {code}
> {code}
> describe test_interval;
> +-----------------+----------------------+----------+--+
> |    col_name     |      data_type       | comment  |
> +-----------------+----------------------+----------+--+
> | day_interval    | interval_day_time    |          |
> | month_interval  | interval_year_month  |          |
> +-----------------+----------------------+----------+--+
> {code}
> This raises an error.
> {code}
> create table test_interval(                                                         
>    day_interval 	interval_day_time,                                                 
 
>    month_interval 	interval_year_month
>    );
> {code}



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

Mime
View raw message