reductionista commented on a change in pull request #533:
URL: https://github.com/apache/madlib/pull/533#discussion_r562987494



##########
File path: src/ports/postgres/modules/utilities/utilities.py_in
##########
@@ -75,6 +75,35 @@ def get_segments_per_host():
         return max(1, count)
 # 
------------------------------------------------------------------------------
 
+def get_data_distribution_per_segment(table_name):
+    """
+    Returns a list with count of segments on each host that the input
+    table's data is distributed on.
+    :param table_name: input table name
+    :return: list with count of segments on each host that the input
+    table's data is distributed on.
+    len(return list) = total num of segments in cluster
+    """
+    if is_platform_pg():
+        return [1]
+    else:
+        res = plpy.execute("""
+                    WITH CTE AS (SELECT DISTINCT(gp_segment_id)

Review comment:
       Lowercase cte would be better, since it's an identifier rather than a 
reserved keyword




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to