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

Hive QA commented on HIVE-16324:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12867683/HIVE-16324.01.patch

{color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10689 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr]
 (batchId=144)
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainanalyze_3] 
(batchId=97)
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3] 
(batchId=97)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5220/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5220/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5220/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12867683 - PreCommit-HIVE-Build

> Truncate table should not work when EXTERNAL property of table is true
> ----------------------------------------------------------------------
>
>                 Key: HIVE-16324
>                 URL: https://issues.apache.org/jira/browse/HIVE-16324
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Vihang Karajgaonkar
>            Assignee: Vihang Karajgaonkar
>         Attachments: HIVE-16324.01.patch
>
>
> Currently if you create an external table using the command {{CREATE EXTERNAL 
> TABLE table_name}} the {{TRUNCATE table table_name}} command fails as 
> expected because only managed tables should be allowed to be truncated.
> But if you set the external property of a previously managed table using 
> {{ALTER TABLE table_name SET TBLPROPERTIES('EXTERNAL'='true')}}, truncate 
> table command does not object and deletes all the data from the external 
> table.
> Eg: This works but it should not ..
> {noformat}
> 0: jdbc:hive2://localhost:10000/default> create table test_ext2 (col1 string);
> No rows affected (0.424 seconds)
> 0: jdbc:hive2://localhost:10000/default> alter table test_ext2 set 
> tblproperties ('EXTERNAL'='true');
> No rows affected (0.149 seconds)
> 0: jdbc:hive2://localhost:10000/default> insert into table test_ext2 values 
> ("test");
> WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the 
> future versions. Consider using a different execution engine (i.e. spark, 
> tez) or using Hive 1.X releases.
> No rows affected (3.447 seconds)
> 0: jdbc:hive2://localhost:10000/default>
> 0: jdbc:hive2://localhost:10000/default>
> 0: jdbc:hive2://localhost:10000/default> select * from test_ext2;
> +-----------------+
> | test_ext2.col1  |
> +-----------------+
> | test            |
> +-----------------+
> 1 row selected (0.147 seconds)
> 0: jdbc:hive2://localhost:10000/default> truncate table test_ext2;
> No rows affected (0.138 seconds)
> 0: jdbc:hive2://localhost:10000/default> select * from test_ext2;
> +-----------------+
> | test_ext2.col1  |
> +-----------------+
> +-----------------+
> No rows selected (0.134 seconds)
> 0: jdbc:hive2://localhost:10000/default>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to