зеркало из https://github.com/mozilla/PyHive.git
Work around Hive/Spark SHOW SCHEMAS incompatibility
Spark returns a different column name (databaseName instead of database_name), but for both spark and hive the first column contains the database name (#109)
This commit is contained in:
Родитель
34f3c3db92
Коммит
cd144b198d
|
@ -201,7 +201,7 @@ class HiveDialect(default.DefaultDialect):
|
|||
|
||||
def get_schema_names(self, connection, **kw):
|
||||
# Equivalent to SHOW DATABASES
|
||||
return [row.database_name for row in connection.execute('SHOW SCHEMAS')]
|
||||
return [row[0] for row in connection.execute('SHOW SCHEMAS')]
|
||||
|
||||
def get_view_names(self, connection, schema=None, **kw):
|
||||
# Hive does not provide functionality to query tableType
|
||||
|
|
Загрузка…
Ссылка в новой задаче