You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by rashmi815 <gi...@git.apache.org> on 2017/05/24 18:58:54 UTC

[GitHub] incubator-madlib issue #136: Graph: Add APSP with grouping

Github user rashmi815 commented on the issue:

    https://github.com/apache/incubator-madlib/pull/136
  
    Ran a test with the following data set and found that the get_path function outputs two paths for the example I tried (tests were run using a Greenplum database 4.3.12 VM on local machine).  See below:
    ```sql
    drop table if exists vertex_disc, edge_disc;
    
    create table vertex_disc (id integer) distributed by (id);
    create table edge_disc (src int, dest int, weight float8) distributed randomly;
    
    insert into vertex_disc VALUES
    (0),
    (1),
    (2),
    (3),
    (4),
    (5),
    (6),
    (7),
    (8),
    (9),
    (10)
    ;
    
    insert into edge_disc VALUES
    (0, 5, 1),
    (1, 0, 1),
    (1, 3, 1),
    (2, 6, 1),
    (3, 4, 1),
    (3, 5, 1),
    (4, 2, 1),
    (8, 9, 1),
    (10, 8, 1)
    ;
    
    drop table if exists out_disc, out_disc_summary;
    SELECT madlib.graph_apsp('vertex_disc',NULL,'edge_disc',NULL,'out_disc');
    
    SELECT * FROM out_disc_summary;
    SELECT * FROM out_disc ORDER BY src,dest;
    
    select madlib.graph_apsp_get_path('out_disc',1,5,'out_disc_path');
    select * from out_disc_path;
      path   
    ---------
     {1,3,5}
     {1,0,5}
    (2 rows)
    ```


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