Browse Source

[Trino] Reformatting the return of the show_table for autocomplete call (#3616)

Ayush Goyal 1 năm trước cách đây
mục cha
commit
b25d6d6192
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      desktop/libs/notebook/src/notebook/connectors/trino.py

+ 7 - 2
desktop/libs/notebook/src/notebook/connectors/trino.py

@@ -302,8 +302,13 @@ class TrinoApi(Api):
     query_client = TrinoQuery(self.db, 'SHOW TABLES')
     response = query_client.execute()
     tables = response.rows
-
-    return tables
+    return [{
+        'name': table[0],
+        'type': 'table',
+        'comment': '',
+      }
+      for table in tables
+    ]
 
 
   def _get_columns(self, database, table):