madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From njayaram2 <...@git.apache.org>
Subject [GitHub] incubator-madlib pull request #113: Graph: Add grouping support to SSSP
Date Fri, 14 Apr 2017 18:19:35 GMT
Github user njayaram2 commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/113#discussion_r111612309
  
    --- Diff: src/ports/postgres/modules/graph/sssp.py_in ---
    @@ -137,45 +226,116 @@ def graph_sssp(schema_madlib, vertex_table, vertex_id, edge_table,
     			<!''!>)
     		plpy.execute(sql_index)
     
    -		# The source can be reached with 0 cost and it has itself as the parent.
    -		plpy.execute(
    -			""" INSERT INTO {oldupdate}
    -				VALUES({source_vertex},0,{source_vertex})
    -			""".format(**locals()))
    +		# The initialization step is quite different when grouping is involved
    +		# since not every group (subgraph) will have the same set of vertices.
    +
    +		# Example:
    +		# Assume there are two grouping columns g1 and g2
    +		# g1 values are 0 and 1. g2 values are 5 and 6
    +		if grouping_cols is not None:
    +
    +			distinct_grp_table = unique_string(desp='grp')
    +			plpy.execute(""" DROP TABLE IF EXISTS {distinct_grp_table} """.
    --- End diff --
    
    Some temp tables such as `distinct_grp_table`, `new update`, `old update` and `temp_table`
 are not dropped at the end. Not sure if there are other such tables, please check and drop
them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message