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 2020/03/03 19:56:44 UTC

[GitHub] [madlib] orhankislal commented on a change in pull request #483: Graph/type bigint

orhankislal commented on a change in pull request #483: Graph/type bigint
URL: https://github.com/apache/madlib/pull/483#discussion_r387258557
 
 

 ##########
 File path: src/ports/postgres/modules/graph/wcc.py_in
 ##########
 @@ -294,7 +294,7 @@ def wcc(schema_madlib, vertex_table, vertex_id, edge_table, edge_args,
     if not is_platform_pg():
         # Drop intermediate table created for Greenplum
         plpy.execute("DROP TABLE IF EXISTS {0}".format(edge_inverse))
-    plpy.execute("ALTER TABLE {0} RENAME TO {1}".format(newupdate, out_table))
+    plpy.execute("CREATE TABLE {0} AS SELECT * FROM {1}".format(out_table, newupdate))
 
 Review comment:
   `newupdate` is dropped at the end of the function(line 316-317). We need this change because postgresql doesn't allow altering the schema of a table. If the user wants the output table in a specific schema, alter table line will fail.

----------------------------------------------------------------
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