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

Ivan Suller commented on HIVE-24361:
------------------------------------

Why do you think the behavior for Use Case 2 is the right one? I expect that 
after
{code:sql}
insert overwrite table test1 select * from test2;
{code}

The following two queries have the same result in every case:
{code:sql}
select count(*) from test1;
select count(*) from test2;
{code}

It seems you think that's not the case if "test2" table is empty. Why?

> Insert overwrite with empty data is different in normal table then 
> transactional table
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-24361
>                 URL: https://issues.apache.org/jira/browse/HIVE-24361
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.0
>            Reporter: ABHISHEK KUMAR GUPTA
>            Priority: Minor
>
> Steps:
> Use Case 1:
> create table test3(id int);
> insert into table test3 values(20);
> create table test4(id int);
> insert overwrite table test3 select * from test4;
> select * from test 3;
> Result: 0 rows
> Use Case 2:
> For transnational Table:
> create table test1(id int) stored as orc 
> tblproperties('transactional'='true');
> insert into test1 values(20);
> create table test2(id int) stored as orc 
> tblproperties('transactional'='true');
> insert overwrite table test1 select * from test2;
> select * from test 1;
> Result: 1 rows
> Expectation: Use Case 1 should behave as Use Case 2.



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

Reply via email to