浏览代码

[hive] Stay backward compatible with older versions

Romain Rigaux 10 年之前
父节点
当前提交
a876063
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      apps/beeswax/src/beeswax/server/dbms.py

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

@@ -175,8 +175,9 @@ class HiveServer2Dbms(object):
 
   def get_tables(self, database='default', table_names='*'):
     identifier = self.to_matching_wildcard(table_names)
+    identifier = "'%s'" % identifier if identifier != '*' else '' # Filter not always supported
 
-    hql = "SHOW TABLES IN `%s` '%s'" % (database, identifier) # self.client.get_tables(database, table_names) is too slow
+    hql = "SHOW TABLES IN `%s` %s" % (database, identifier) # self.client.get_tables(database, table_names) is too slow
     query = hql_query(hql)
     timeout = SERVER_CONN_TIMEOUT.get()