You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "Frank McQuillan (JIRA)" <ji...@apache.org> on 2017/08/17 18:04:00 UTC

[jira] [Commented] (MADLIB-1141) Graph - SSSP with empty string grouping_col fails

    [ https://issues.apache.org/jira/browse/MADLIB-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130933#comment-16130933 ] 

Frank McQuillan commented on MADLIB-1141:
-----------------------------------------

this seems to work now
{code}
DROP TABLE IF EXISTS out, out_summary;
SELECT madlib.graph_sssp(
                         'vertex',      -- Vertex table
                         NULL,          -- Vertex id column (NULL means use default naming)
                         'edge',        -- Edge table
                         NULL,          -- Edge arguments (NULL means use default naming)
                         0,             -- Source vertex for path calculation
                         'out',        -- Output table of shortest paths
                        '');
{code}
prodces
{code}
 id | weight | parent 
----+--------+--------
  0 |      0 |      0
  2 |      1 |      0
  4 |     10 |      0
  6 |      3 |      5
  1 |      1 |      0
  3 |      2 |      2
  5 |      2 |      2
  7 |      4 |      6
(8 rows)
{code}


> Graph - SSSP with empty string grouping_col fails
> -------------------------------------------------
>
>                 Key: MADLIB-1141
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1141
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Module: Graph
>            Reporter: Nandish Jayaram
>            Priority: Minor
>             Fix For: v1.12
>
>
> Using the dataset provided in Graph SSSP's user doc page, the following query results in an error:
> {code}
> SELECT madlib.graph_sssp(                                                                                                                                                                       'vertex',      -- Vertex table                                                                                                                                                       NULL,          -- Vertix id column (NULL means use default naming)                                                                                                                   'edge',        -- Edge table                                                                                                                                                         NULL,          -- Edge arguments (NULL means use default naming)                                                                                                                     0,             -- Source vertex for path calculation                                                                                                                                 'out',
> ''     -- empty grouping_col);
> {code}
> The error is:
> {code}
> ERROR:  spiexceptions.SyntaxError: syntax error at or near ","
> LINE 2:                      ,  src AS id, weight,
>                              ^
> QUERY:   CREATE TABLE out AS (SELECT
>                      ,  src AS id, weight,
>                     src AS parent FROM edge LIMIT 0)
> CONTEXT:  Traceback (most recent call last):
>   PL/Python function "graph_sssp", line 23, in <module>
>     return sssp.graph_sssp(**globals())
>   PL/Python function "graph_sssp", line 151, in graph_sssp
> PL/Python function "graph_sssp"
> {code}
> Empty grouping_col string must be treated the same as a NULL.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)