This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch get-rows-tbl-schema
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f11087497cf057802d0fdee903291f04b16d4a30
Author: hughhhh <[email protected]>
AuthorDate: Fri Sep 9 10:51:07 2022 -0700

    placeholder for compute count
---
 superset/databases/utils.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/superset/databases/utils.py b/superset/databases/utils.py
index 9229bb8cba..706455f226 100644
--- a/superset/databases/utils.py
+++ b/superset/databases/utils.py
@@ -52,7 +52,10 @@ def get_col_type(col: Dict[Any, Any]) -> str:
 
 
 def get_table_metadata(
-    database: Any, table_name: str, schema_name: Optional[str]
+    database: Any,
+    table_name: str,
+    schema_name: Optional[str],
+    get_row_count: bool = False,
 ) -> Dict[str, Any]:
     """
     Get table metadata information, including type, pk, fks.
@@ -86,6 +89,11 @@ def get_table_metadata(
                 "comment": col.get("comment"),
             }
         )
+
+    if get_row_count:
+        # compute `select count(*) from {table}`
+        pass
+
     return {
         "name": table_name,
         "columns": payload_columns,

Reply via email to