Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-1141

Graph - SSSP with empty string grouping_col fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v1.12
    • Module: Graph
    • None

    Description

      Using the dataset provided in Graph SSSP's user doc page, the following query results in an error:

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

      The error is:

      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"
      

      Empty grouping_col string must be treated the same as a NULL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            njayaram Nandish Jayaram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: