Преглед изворни кода

HUE-6883 [metastore] Allow deletion of table comments

Johan Ahlen пре 8 година
родитељ
комит
496d627
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      apps/beeswax/src/beeswax/server/dbms.py

+ 1 - 1
apps/beeswax/src/beeswax/server/dbms.py

@@ -230,7 +230,7 @@ class HiveServer2Dbms(object):
     if new_table_name:
     if new_table_name:
       table_name = new_table_name
       table_name = new_table_name
       hql += ' RENAME TO `%s`' % table_name
       hql += ' RENAME TO `%s`' % table_name
-    elif comment:
+    elif comment is not None:
       hql += " SET TBLPROPERTIES ('comment' = '%s')" % comment
       hql += " SET TBLPROPERTIES ('comment' = '%s')" % comment
     elif tblproperties:
     elif tblproperties:
       hql += " SET TBLPROPERTIES (%s)" % ' ,'.join("'%s' = '%s'" % (k, v) for k, v in tblproperties.items())
       hql += " SET TBLPROPERTIES (%s)" % ' ,'.join("'%s' = '%s'" % (k, v) for k, v in tblproperties.items())