animenon commented on a change in 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to