zhaoyongjie commented on a change in pull request #10844:
URL: 
https://github.com/apache/incubator-superset/pull/10844#discussion_r487622467



##########
File path: superset/db_engine_specs/base.py
##########
@@ -655,6 +655,26 @@ def get_view_names(
             views = [re.sub(f"^{schema}\\.", "", view) for view in views]
         return sorted(views)
 
+    @classmethod
+    def get_table_comment(
+        cls, inspector: Inspector, table_name: str, schema: Optional[str]
+    ) -> Optional[str]:
+        """
+        Get comment of table from a given schema and table
+
+        :param inspector: SqlAlchemy Inspector instance
+        :param table_name: Table name
+        :param schema: Schema name. If omitted, uses default schema for 
database
+        :return: comment of table
+        """
+        comment = None
+        try:
+            comment = inspector.get_table_comment(table_name, schema)
+            comment = comment.get("text") if isinstance(comment, dict) else 
None
+        except NotImplementedError:

Review comment:
       thanks reviewed and comment.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to