You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2019/05/31 17:59:17 UTC

[GitHub] [madlib] njayaram2 commented on a change in pull request #401: DL: fix default_buffer_size calculation

njayaram2 commented on a change in pull request #401: DL: fix default_buffer_size calculation
URL: https://github.com/apache/madlib/pull/401#discussion_r289493666
 
 

 ##########
 File path: src/ports/postgres/modules/internal/db_utils.py_in
 ##########
 @@ -93,3 +92,28 @@ def is_col_1d_array(source_table, col_name):
     """.format(col_name, source_table)
     result = plpy.execute(query)
     return result[0]["n_y"]
+
+# ------------------------------------------------------------------------------
+# This function runs postgres array_ndims function to get
+# the dimension of an array. For example if it is a 3
+# dimension array it will be an array with 3 elements
+# like [32,32,3].
+def get_ndims(source_table, col_name):
+    array_ndims = plpy.execute("SELECT array_ndims({0}) AS ndims FROM {1}".
 
 Review comment:
   Yes, that's right. Will do `plpy.execute(query_str, 1)`.

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


With regards,
Apache Git Services