hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naveen Gangam (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-18735) Create table like loses transactional attribute
Date Tue, 02 Jun 2020 00:26:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-18735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17121428#comment-17121428
] 

Naveen Gangam commented on HIVE-18735:
--------------------------------------

[~lpinter] I am trying to understand the behavior for another issue for CTLT. Is the metadata
for the new table meant to be a replica of the source table in terms of table type, table
properties etc? (I understand the location would be different) or is there a syntax where
the source and target table types can be different?
is something like this "create external table ext like mgd_table" supported where mgd_table
is a MANAGED_TABLE?

> Create table like loses transactional attribute
> -----------------------------------------------
>
>                 Key: HIVE-18735
>                 URL: https://issues.apache.org/jira/browse/HIVE-18735
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 2.0.0
>            Reporter: Eugene Koifman
>            Assignee: László Pintér
>            Priority: Major
>             Fix For: 4.0.0
>
>         Attachments: HIVE-18735.01.patch, HIVE-18735.02.patch, HIVE-18735.03.patch, HIVE-18735.04.patch,
HIVE-18735.05.patch, HIVE-18735.06.patch
>
>
> {noformat}
> create table T1(a int, b int) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES
('transactional'='true')";
> create table T like T1;
> show create table T ;
> CREATE TABLE `T`(
>   `a` int,
>   `b` int)
> CLUSTERED BY (
>   a)
> INTO 2 BUCKETS
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
> LOCATION
>  'file:/Users/ekoifman/IdeaProjects/hive/ql/target/tmp/org.apache.hadoop.hive.ql.TestTxnCommands-1518813536099/warehouse/t'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1518813564')
> {noformat}
> Specifying props explicitly does work 
> {noformat}
> create table T1(a int, b int) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES
('transactional'='true')";
> create table T like T1 TBLPROPERTIES ('transactional'='true');
> show create table T ;
> CREATE TABLE `T`(
>   `a` int,
>   `b` int)
> CLUSTERED BY (
>   a)
> INTO 2 BUCKETS
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
> LOCATION
>   'file:/Users/ekoifman/IdeaProjects/hive/ql/target/tmp/org.apache.hadoop.hive.ql.TestTxnCommands-1518814098564/warehouse/t'
> TBLPROPERTIES (
>   'transactional'='true',
>   'transactional_properties'='default',
>   'transient_lastDdlTime'='1518814111')
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message