浏览代码

[flink] #1685 - The DB assist panel lists wrong list of columns for flink table's (#1686)

Asnaik HWX 4 年之前
父节点
当前提交
7bd40066b5
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      desktop/libs/notebook/src/notebook/connectors/flink_sql.py

+ 3 - 4
desktop/libs/notebook/src/notebook/connectors/flink_sql.py

@@ -294,12 +294,11 @@ class FlinkSqlApi(Api):
 
 
     resp = self.db.execute_statement(session_id=session_id, statement='USE %(database)s' % {'database': database})
     resp = self.db.execute_statement(session_id=session_id, statement='USE %(database)s' % {'database': database})
     resp = self.db.execute_statement(session_id=session_id, statement='DESCRIBE %(table)s' % {'table': table})
     resp = self.db.execute_statement(session_id=session_id, statement='DESCRIBE %(table)s' % {'table': table})
-
-    columns = resp['results'][0]['columns']
+    columns = resp['results'][0]['data']
 
 
     return [{
     return [{
-        'name': col['name'],
-        'type': col['type'],  # Types to unify
+        'name': col[0],
+        'type': col[1],  # Types to unify
         'comment': '',
         'comment': '',
       }
       }
       for col in columns
       for col in columns