You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/03/01 14:33:00 UTC

[jira] [Work logged] (HIVE-20057) For ALTER TABLE t SET TBLPROPERTIES ('EXTERNAL'='TRUE'); `TBL_TYPE` attribute change not reflecting for non-CAPS

     [ https://issues.apache.org/jira/browse/HIVE-20057?focusedWorklogId=206442&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-206442 ]

ASF GitHub Bot logged work on HIVE-20057:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Mar/19 14:32
            Start Date: 01/Mar/19 14:32
    Worklog Time Spent: 10m 
      Work Description: animenon commented on pull request #388: HIVE-20057: Fix Hive table conversion DESCRIBE table bug
URL: https://github.com/apache/hive/pull/388#discussion_r261623782
 
 

 ##########
 File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
 ##########
 @@ -1802,12 +1802,12 @@ private MTable convertToMTable(Table tbl) throws InvalidObjectException,
     // accordingly
     String tableType = tbl.getTableType();
     boolean isExternal = Boolean.parseBoolean(tbl.getParameters().get("EXTERNAL"));
-    if (TableType.MANAGED_TABLE.toString().equals(tableType)) {
+    if (TableType.MANAGED_TABLE.toString().equalsIgnoreCase(tableType)) {
 
 Review comment:
   @sankarh The table type gets converted as expected but the describe formatted view shows it wrongly.
   Example: I converted the below Managed table to External using ` .. SET TBLPROPERTIES ('EXTERNAL'='True')`
   ![image](https://user-images.githubusercontent.com/6907950/53644278-3546c900-3c5c-11e9-9f26-aceaed0eed7b.png)
   
   If I do the same using `.. SET TBLPROPERTIES ('EXTERNAL'='TRUE')`
   ![image](https://user-images.githubusercontent.com/6907950/53644443-a25a5e80-3c5c-11e9-8171-f7fb0b3eea41.png)
   
   Let me know if you need further details.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 206442)
    Time Spent: 1h 10m  (was: 1h)

> For ALTER TABLE t SET TBLPROPERTIES ('EXTERNAL'='TRUE'); `TBL_TYPE` attribute change not reflecting for non-CAPS
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-20057
>                 URL: https://issues.apache.org/jira/browse/HIVE-20057
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: All Versions
>            Reporter: Anirudh
>            Assignee: Anirudh
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.1.0
>
>         Attachments: hive20057.patch
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Hive EXTERNAL table shown as MANAGED after conversion using 
> {code} ALTER TABLE t SET TBLPROPERTIES ('EXTERNAL'='True')
> {code}
>  
> The DESCRIBE FORMATTED shows:
> {code}
> Table Type:            MANAGED_TABLE
> Table Parameters:
>                                EXTERNAL           True
> {code}
>  
> This is actually a External table but is shown wrongly, as 'True' was used in place of 'TRUE' in the ALTER statement.
> Issue explained here: 
> [StakOverflow - Hive Table is MANAGED or EXTERNAL|https://stackoverflow.com/questions/51103317/hive-table-is-managed-or-external/51142873#51142873]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)