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

Ayush Saxena commented on HIVE-26959:
-------------------------------------

Should have given create external table, rather tham just create table, without 
external keyword it will consider like you are trying for managed table, which 
will get translated to external table with purge true, which takes precedence 
over the one specificied in the table properties

> CREATE TABLE with external.table.purge=false is ignored
> -------------------------------------------------------
>
>                 Key: HIVE-26959
>                 URL: https://issues.apache.org/jira/browse/HIVE-26959
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Li Penglin
>            Priority: Major
>
> We set the default external.table.purge=true in 
> https://issues.apache.org/jira/browse/HIVE-26064, but this property is still 
> true when I set it to false.
>  
> {code:java}
> select version();
> +----------------------------------------------------+
> |                        _c0                         |
> +----------------------------------------------------+
> | 4.0.0-alpha-2 r36f5d91acb0fac00a5d46049bd45b744fe9aaab6 |
> 0: jdbc:hive2://localhost:11050>  create table test_parq_hive (i int)         
>                                 
> . . . . . . . . . . . . . . . .>  stored as parquet                           
>                                                  
> . . . . . . . . . . . . . . . .>  tblproperties 
> ('external.table.purge'='false');                             
> INFO  : Compiling 
> command(queryId=root_20230118111342_c60c0f5f-3e2f-45af-a7ab-13f099b7ead9): 
> create table test_parq_hive (i int)
> stored as parquet                                                             
>                                                  
> tblproperties ('external.table.purge'='false')
> INFO  : Semantic Analysis Completed (retrial = false)
> 0: jdbc:hive2://localhost:11050> describe formatted test_parq_hive; 
> |                               | bucketing_version                           
>        | 2                     |                 
> |                               | external.table.purge                        
>        | TRUE                  |                                              
>                                                                               
>                     
> |                               | transient_lastDdlTime                       
>        | 1674011622            |    
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to